Module std::result

Type for operations that can fail.

Result is the type that can be used to express fallible operations in the type system. Alumina does not have exceptions. Value Result<T, E> can be either a successfull value of type T or an error value E, usually in some form representing the failure that happened.

Result is commonly used with the try operator (?) so that fallible functions can be composed easily by bailing early.

Result values can also be transformed without unwrapping them using combinators such as map and and_then, and converted into Option with get/get_err.


Either a success value or an error value.


Extract the success value or short-circuit the calling function.