toResult

Downgrades an ErrorOr to a Result.


inline fun <A : Throwable, B> B?.toResult(error: () -> A): Result<B>(source)

Turns a nullable value into a Result.


inline fun <A, B : Throwable> Option<A>.toResult(error: () -> B): Result<A>(source)

Turns an Option value into a Result.