Failure
Properties
Link copied to clipboard
Property alias for flattenNestedFailure.
val <Ok, Err, Oks : Ok, Ers : Err, Okf : Ok, Erf : Err> Outcome<Outcome<Oks, Ers>, Outcome<Okf, Erf>>.flatten: Outcome<Ok, Err>
Property alias for flattenNestedBoth.
Property alias for flattenNestedSuccess.
Link copied to clipboard
Converts an Outcome to a KotlinResult.
Functions
Link copied to clipboard
inline fun <In, Out, Error> Outcome<In, Error>.andThen(catch: (throwable: Throwable) -> Outcome<Out, Error> = ::rethrow, scope: RaiseScope<Error> = DefaultRaiseScope(), success: RaiseScope<Error>.(In) -> Out): Outcome<Out, Error>
Transforms the Success value of this Outcome, wrapping the result with outcome error-catching semantics.
Link copied to clipboard
inline suspend fun <In, Out, Error> Outcome<In, Error>.andThenOf(catch: (throwable: Throwable) -> Outcome<Out, Error> = ::rethrow, scope: RaiseScope<Error> = DefaultRaiseScope(), success: suspend RaiseScope<Error>.(In) -> Out): Outcome<Out, Error>
Transforms the Success value of this Outcome, wrapping the result with outcomeOf error-catching semantics.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
context(scope: RaiseScope<OuterError>)
fun <OuterError, Ok : OuterError, InnerError> Outcome<Ok, InnerError>.errorOrRaise(): InnerError
fun <OuterError, Ok : OuterError, InnerError> Outcome<Ok, InnerError>.errorOrRaise(): InnerError
Returns the Failure error, or short-circuits the surrounding RaiseScope with the Success value.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <OuterOk : AncestorOk, EmbeddedOk : AncestorOk, Error, AncestorOk> Outcome<OuterOk, Outcome<EmbeddedOk, Error>>.flattenNestedFailure(): Outcome<AncestorOk, Error>
Link copied to clipboard
Link copied to clipboard
context(scope: RaiseScope<OuterError>)
fun <OuterError, Ok, InnerError : OuterError> Outcome<Ok, InnerError>.getOrRaise(): Ok
fun <OuterError, Ok, InnerError : OuterError> Outcome<Ok, InnerError>.getOrRaise(): Ok
Returns the Success value, or short-circuits the surrounding RaiseScope with the Failure error.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard