Mosaic

interface Mosaic(source)

Per-request context used to execute tiles and access dependencies.

Inheritors

Properties

Link copied to clipboard
abstract val canvas: Canvas

Functions

Link copied to clipboard
open suspend fun <V> compose(tile: Tile<V>): V

Await the value of a Tile

open suspend fun <K : Any, V> compose(tile: MultiTile<K, V>, key: K): V

Await a single value from a MultiTile

open suspend fun <K : Any, V> compose(tile: MultiTile<K, V>, keys: Collection<K>): Map<K, V>

Await the value of a MultiTile

Link copied to clipboard
abstract fun <V> composeAsync(tile: Tile<V>): Deferred<V>

Retrieve the value of a Tile wrapped in a deferred for awaiting later

open fun <K : Any, V> composeAsync(tile: MultiTile<K, V>, key: K): Deferred<V>

Retrieve a single value from a MultiTile wrapped in a deferred for awaiting later

abstract fun <K : Any, V> composeAsync(tile: MultiTile<K, V>, keys: Collection<K>): Map<K, Deferred<V>>

Retrieve the value of a MultiTile wrapped in a deferred for awaiting later

Inherited functions

Link copied to clipboard
inline fun <T : Any> Mosaic.source(qualifier: String? = null): T

Retrieves a dependency from the canvas using reified type parameters.

fun <T : Any> Mosaic.source(key: CanvasKey<T>): T

Retrieves a dependency from the canvas using a CanvasKey.

Link copied to clipboard
inline fun <T : Any> Mosaic.sourceOr(qualifier: String? = null): T?

Retrieves a dependency from the canvas using reified type parameters, returning null if not found.

fun <T : Any> Mosaic.sourceOr(key: CanvasKey<T>): T?

Retrieves a dependency from the canvas using a CanvasKey, returning null if not found.