Wrap a value into a Result (like in Rust).
Class methods
err?
Returns true if current Result class is Err, false otherwise.
Sourceok?
Returns true if current Result class is Ok, false otherwise.
SourceInstance methods
err?
Returns true if current Result instance is Err, false otherwise.
Sourceok?
Returns true if current Result instance is Ok, false otherwise.
Sourcestate
Extract the Result state (type, status and value).
Inspired by the Elixir lang approach, it's handy for the pattern matching.
Sourcestatus
Result status as a Symbol (:done or :fail, etc).
SourceChecks a status.
res.status?(:done)
res.status?(:fail)
Sourcetype
Result type as a Symbol (:ok or :err).
Sourceunwrap
Unwrap the result value (like Result::unwrap in Rust).
Sourcevalue
Returns the result value.
Source