Result::ok
pub fn ok() -> Option<T>
Source: compiler/src/prelude/core.hy Called on a Result value as value.ok(…).
Returns#
Option<T>
See also#
ResultOptionResult::is_ok: True when this isOk.Result::is_err: True when this isErr.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.