The function to apply to the wrapped Err
value to get a
usable value if result
is an Err
.
The function to apply to the wrapped Ok
value if result
is
an Ok
.
The Result
instance to map over.
T The type of the wrapped Ok
value.
U The type of the resulting value from applying mapFn
to the
Ok
value or orElseFn
to the Err
value.
E The type of the wrapped Err
value.
Generated using TypeDoc
Map over a
Result
instance as inmap
and get out the value ifresult
isOk
, or apply a function (orElseFn
) to the value wrapped in theErr
to get a default value.Like
mapOr
but using a function to transform the error into a usable value instead of simply using a default value.Examples