Transposes a Maybe of a Result into a Result of a Maybe.
Maybe
Result
Just(Ok(T))
Ok(Just(T))
Just(Err(E))
Err(E)
Nothing
Ok(Nothing)
a Maybe<Result<T, E>> to transform to a Result<Maybe<T>, E>>.
Maybe<Result<T, E>>
Result<Maybe<T>, E>>
Transposes a
Maybe
of aResult
into aResult
of aMaybe
.Just(Ok(T))
Ok(Just(T))
Just(Err(E))
Err(E)
Nothing
Ok(Nothing)