SuspendProvider

Produces values of type T in a suspend context.

Produces values of type T in a suspend context.

Produces values of type T in a suspend context.

Produces values of type T in a suspend context.

Produces values of type T in a suspend context.

Functions

Link copied to clipboard
inline fun <T, R> SuspendProvider<T>.flatMap(crossinline transform: suspend (T) -> SuspendProvider<R>): SuspendProvider<R>

Returns a provider that passes this provider's value to transform, then invokes the returned provider.

Link copied to clipboard
expect abstract suspend operator fun invoke(): T
actual abstract suspend operator fun invoke(): T
actual abstract suspend operator override fun invoke(): T
actual abstract suspend operator override fun invoke(): T
actual abstract suspend operator override fun invoke(): T
Link copied to clipboard
inline fun <T, R> SuspendProvider<T>.map(crossinline transform: suspend (T) -> R): SuspendProvider<R>

Returns a provider that applies transform to this provider's value.

Link copied to clipboard
inline fun <T, R, V> SuspendProvider<T>.zip(other: SuspendProvider<R>, crossinline transform: suspend (T, R) -> V): SuspendProvider<V>

Returns a provider that invokes this provider and other sequentially, then combines their values with transform.