transposeResultToOption
Transposes a Result
of an Option
into an Option
of a Result
.
Ok(Some(v))
->Some(Ok(v))
Ok(None)
->None
Err(e)
->Some(Err(e))
Transposes a Result
of an Option
into an Option
of a Result
.
Ok(Some(v))
-> Some(Ok(v))
Ok(None)
-> None
Err(e)
-> Some(Err(e))