Convert a Result to a Maybe.
Result
Maybe
The converted type will be ~Just Just if the Result is ~Ok Ok or ~Nothing Nothing if the Result is ~Err Err; the wrapped error value will be discarded.
~Just Just
~Ok Ok
~Nothing Nothing
~Err Err
The Result to convert to a Maybe
Just the value in result if it is Ok; otherwise Nothing
Just
result
Ok
Nothing
Convert a
Result
to aMaybe
.The converted type will be
~Just Just
if theResult
is~Ok Ok
or~Nothing Nothing
if theResult
is~Err Err
; the wrapped error value will be discarded.