source

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

Retrieves a dependency from the canvas using reified type parameters.

Return

The dependency instance

Parameters

qualifier

Optional qualifier to distinguish between multiple instances of the same type

Type Parameters

T

The type of the dependency to retrieve

Throws

if the dependency is not found


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

Retrieves a dependency from the canvas using a CanvasKey.

Return

The dependency instance

Parameters

key

The canvas key identifying the dependency

Type Parameters

T

The type of the dependency to retrieve

Throws

if the dependency is not found