success

Creates a Success with a true value.

Return

A Success instance containing true.


fun <T> success(value: T): Outcome.Success<T>

Creates a Success with the specified value.

Return

A Success instance containing the value.

Parameters

value

The value to wrap in a Success.


inline suspend fun <T> success(block: suspend () -> T): Outcome.Success<T>

Executes the block and wraps the result in a Success.

Return

A Success instance containing the result of block.

Parameters

block

The function to execute.