SuspendLazy

A value obtained in a suspend context and cached for later calls.

Functions

Link copied to clipboard
abstract suspend fun await(): T

Returns the cached value, suspending while initialization runs when necessary. A failed or cancelled initialization is not cached.

Link copied to clipboard
abstract fun isInitialized(): Boolean

Returns true when a cached value is available.