Outcome Of Raise
Emulation of context receivers, when they're released this can be replaced by context receiver based code in Arrow itself.
We guarantee that the wrapped Any?
will only result in Throwable
or Absent
. Exposing this as Raise<Throwable>
gives natural interoperability with Raise<Throwable>
DSLs (Either
).
Functions
Link copied to clipboard
open suspend fun <OtherError, A> attempt(f: suspend EffectScope<OtherError>.() -> A): Effect<OtherError, A>
Link copied to clipboard
Converts Result<Option<A>>
to OutcomeOf and binds over the value
Link copied to clipboard
Link copied to clipboard
Converts an ErrorOr
Link copied to clipboard
Converts Result<A>
to OutcomeOf and binds over the value
Link copied to clipboard
open infix suspend fun <OtherError, A> Effect<OtherError, A>.catch(recover: suspend Raise<Throwable>.(otherError: OtherError) -> A): A
Link copied to clipboard