FabricAvailability

sealed interface FabricAvailability

Whether a Loom's underlying transport fabric can be attempted on this runtime. A fabric scoped out by target (e.g. WebRTC only present on wasmJs) is simply absent — not Unavailable. Unavailable means present-but-not-usable-now.

Samples

val loom = InMemoryLoom()
when (val avail = loom.availability()) {
    is FabricAvailability.Available -> { /* ready to weave */ }
    is FabricAvailability.Unavailable -> error("Fabric not usable: ${avail.reason}")
}

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
data class Unavailable(val reason: String) : FabricAvailability