toResult

open fun toResult(): Result<T>

Converts this Outcome to a Result.

Return

A Result containing the value if successful, or an exception if failed.