CanvasBuilder

Builder for constructing a Canvas with dependency bindings.

Use this builder to register dependencies that will be available for injection in tiles and other canvas-aware components.

Functions

Link copied to clipboard
inline fun <T : Any> single(qualifier: String? = null, noinline ctor: suspend CanvasFactory.() -> T)
fun <T : Any> single(key: CanvasKey<T>, ctor: suspend CanvasFactory.() -> T)

Registers a singleton dependency in the canvas.

Inherited functions

Link copied to clipboard

Integration-author installation hook, separate from the ordinary Canvas dependency DSL. Installs one supported observer for this Canvas and all descendants. Local, inherited, and reentrant duplicates fail before another factory executes. Failed factories leave configuration unchanged. Canvas never owns provider shutdown. Import this extension from the observation package explicitly.