NameSummary
catch Catches any errors in the result and returns the result of the handler function.
unwrap Returns the value inside the result, or panics if the result is an error.
unwrapOr Returns the value inside the result, or the default value if the result is an error.
fn result.catch(fn) -> result<T>
Catches any errors in the result and returns the result of the handler function.
Parameters
fnThe function to apply to the error if the result is an error.
Returns
fn result.unwrap() -> T
Returns the value inside the result, or panics if the result is an error.
Returns
T
fn result.unwrapOr(defaultValue) -> T
Returns the value inside the result, or the default value if the result is an error.
Parameters
defaultValueThe default value to return if the result is an error.
Returns
T