This conversion is useful when you want to discard error information and
only care about whether an operation succeeded. The error information is
lost in this conversion, so use it when error details are not needed.
If the Result is Ok, returns Some with the value. If the Result is
Err, returns None.
Converts a
Result
to anOptional
.This conversion is useful when you want to discard error information and only care about whether an operation succeeded. The error information is lost in this conversion, so use it when error details are not needed.
If the
Result
isOk
, returnsSome
with the value. If theResult
isErr
, returnsNone
.