Result::unwrap_or_else
pub fn unwrap_or_else(E -> T f) -> T
Source: compiler/src/prelude/core.hy The Ok value, or f applied to the error.
Called on a Result value as value.unwrap_or_else(…).
Parameters#
| Name | Type |
|---|---|
f | E -> T |
Returns#
T
See also#
ResultResult::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::map:Ok(f(value)), or the same error.Result::map_err: The same value, orErr(f(error)).