Extensions for io.reactivex.MaybeSource
suspend fun <T> MaybeSource<T>.await(): T? Awaits for completion of the maybe without blocking a thread. Returns the resulting value, null if no value was produced or throws the corresponding exception if this maybe had produced error. |
|
suspend fun <T> MaybeSource<T>.awaitOrDefault(default: T): T Awaits for completion of the maybe without blocking a thread. Returns the resulting value, default if no value was produced or throws the corresponding exception if this maybe had produced error. |
|
suspend fun <T> MaybeSource<T>.consumeEach( Subscribes to this MaybeSource and performs the specified action for each received element. |
|
fun <T> MaybeSource<T>.openSubscription(): SubscriptionReceiveChannel<T> Subscribes to this MaybeSource and returns a channel to receive elements emitted by it. The resulting channel shall be closed to unsubscribe from this source. |