map Error
infix inline fun <V, E, F> Result<V, E>.mapError(transform: (E) -> F): Result<V, F>
Content copied to clipboard
Maps this Result to Result by either applying the transform function to the error if this Result is Err, or returning this Ok.
Elm: Result.mapError
Haskell: Data.Bifunctor.right
Rust: Result.map_err