mapErr<F> method
Maps a Result<T, E>
to a Result<T, F>
using the given function with the
held value.
Returns:
See also:
Rust: Result::map_err()
Implementation
Result<T, F> mapErr<F>(F Function(E) mapFn) {
return switch (this) {
Ok(:T v) => Ok(v),
Err(:E e) => Err(mapFn(e)),
};
}