toResult

suspend fun <Error, A> Effect<Error, A>.toResult(recover: suspend (error: Error) -> Result<A>): Result<A>(source)

Run the Effect by returning Result of A, recover run the fallback lambda and returning its result of Result of A.


inline fun <Error, A> EagerEffect<Error, A>.toResult(recover: (error: Error) -> Result<A>): Result<A>(source)

Run the EagerEffect by returning Result of A, recover run the fallback lambda and returning its result of Result of A.


suspend fun <A> Effect<Throwable, A>.toResult(): Result<A>(source)

Run the Effect by returning Result of A, or Result.Failure if raised with Throwable.


Run the EagerEffect by returning Result of A, or Result.Failure if raised with Throwable.