Result::map_err
pub fn map_err<F>(E -> F f) -> Result<T, F>
Source: compiler/src/prelude/core.hy The same value, or Err(f(error)).
Called on a Result value as value.map_err(…).
Parameters#
| Name | Type |
|---|---|
f | E -> F |
Returns#
Result<T, F>
See also#
Result: The outcome of an operation that can fail:Ok(value)orErr(error).Result::is_ok: True when this isOk.Result::is_err: True when this isErr.Result::ok: TheOkvalue as anOption.Result::err: TheErrvalue as anOption.Result::unwrap_or: TheOkvalue, orfallbackonErr.Result::unwrap_or_else: TheOkvalue, orfapplied to the error.Result::map:Ok(f(value)), or the same error.