ResultExtensions<T> extension

Extension methods for easier result handling

on

Methods

unwrap() → T

Available on Result<T>, provided by the ResultExtensions extension

Returns the value if successful, throws the failure message otherwise
unwrapOr(T defaultValue) → T

Available on Result<T>, provided by the ResultExtensions extension

Returns the value if successful, the provided default value otherwise
unwrapOrElse(T defaultValue(Failure)) → T

Available on Result<T>, provided by the ResultExtensions extension

Returns the value if successful, the result of the provided function otherwise