NullableEffect

fun interface NullableEffect<A> : Effect<A?>

Deprecated

Deprecated in favor of Effect DSL: EffectScope

Functions

Link copied to clipboard
open suspend fun <B> B?.bind(): B
open suspend fun <B> Option<B>.bind(): B
Link copied to clipboard
abstract fun control(): DelimitedScope<A?>
Link copied to clipboard
open suspend fun ensure(value: Boolean)

Ensure check if the value is true, and if it is it allows the nullable { } binding to continue. In case it is false, then it short-circuits the binding and returns null.

Inheritors

Link copied to clipboard

Extensions

Link copied to clipboard
suspend fun <B : Any> NullableEffect<*>.ensureNotNull(value: B?): B

Ensures that value is not null. When the value is not null, then it will be returned as non null and the check value is now smart-checked to non-null. Otherwise, if the value is null then the option binding will short-circuit with None.