Module result

Module result 

Source
Expand description

Lambda-encoded result type

Functionsยง

and_then
Applied to a lambda-encoded Result and a function that returns a lambda-encoded Result, it applies the function to the contents of the Result if it is Ok.
err
Applied to an argument it consumes it and produces a lambda-encoded Result::Err that contains it.
is_err
Applied to a lambda-encoded Result it produces a lambda-encoded boolean indicating whether it is Result::Err.
is_ok
Applied to a lambda-encoded Result it produces a lambda-encoded boolean indicating whether it is Result::Ok.
map
Applied to a function and a lambda-encoded Result it applies the function to the contents of the Result if it is Ok.
map_err
Applied to a function and a lambda-encoded Result it applies the function to the contents of the Result if it is Err.
ok
Applied to an argument it consumes it and produces a lambda-encoded Result::Ok that contains it.
option_err
Applied to a lambda-encoded Result it produces a lambda-encoded Option containing the Err value.
option_ok
Applied to a lambda-encoded Result it produces a lambda-encoded Option containing the Ok value.
unwrap_or
Applied to a Term and a lambda-encoded Result it returns the value inside the Ok or the first argument if the Result is not Ok.