Result::and_then
pub fn and_then<U>(T -> Result<U, E> f) -> Result<U, E>
Source: compiler/src/prelude/core.hy f(value) (itself a Result), or the same error.
Called on a Result value as value.and_then(…).
Parameters#
| Name | Type |
|---|---|
f | T -> Result<U, E> |
Returns#
Result<U, E>
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::unwrap_or_else: TheOkvalue, orfapplied to the error.Result::map:Ok(f(value)), or the same error.