Transforms the error value of a Result using a mapping function.
If the result is Err, the apply function is called with its error value, and a new Err result
containing the transformed error value is returned. If the result is Ok, it is returned unchanged.
Type Parameters
T
The type of the successful value.
E
The original type of the error value.
U
The new type of the error value after transformation.
Transforms the error value of a
Result
using a mapping function. If the result isErr
, theapply
function is called with its error value, and a newErr
result containing the transformed error value is returned. If the result isOk
, it is returned unchanged.