Success
Properties
Link copied to clipboard
Returns Failure.failure, or null
if this outcome is not a failure.
Link copied to clipboard
Returns Success.value, or null
if this outcome is not successful.
Functions
Link copied to clipboard
inline fun <Failure, InputValue, OutputValue> Outcome<Failure, InputValue>.map(transform: (InputValue) -> OutputValue): Outcome<Failure, OutputValue>
If this outcome is successful, replaces its value using transform.
Link copied to clipboard
inline fun <InputFailure, Value, OutputFailure> Outcome<InputFailure, Value>.mapFailure(transformFailure: (InputFailure) -> OutputFailure): Outcome<OutputFailure, Value>
If this outcome is failed, replaces its failure using transformFailure.
Link copied to clipboard
fun <Failure, Value> Outcome<Failure, Value>.withProgress(progress: Progress = done()): ProgressiveOutcome<Failure, Value>
Adds progress information to this outcome to make it a ProgressiveOutcome.