Class: Errgonomic::Result::Err
Overview
The Err variant. It always carries an error, so unwrap_err! and a pattern variable bind what the caller put there.
Constant Summary
Constants inherited from Any
Instance Method Summary collapse
-
#err? ⇒ Boolean
Err is always err.
-
#inspect ⇒ Object
Render like Rust's Debug, delegating to the inner value's inspect.
-
#ok? ⇒ Boolean
Err is never ok.
Methods inherited from Any
#!=, #<=>, #==, #===, #and, #and_then, #as_json, #deconstruct, #eql?, #err_and?, #expect!, #hash, #initialize, #map, #map_err, #method_missing, #ok_and?, #or, #or_else, #pretty_print, #respond_to_missing?, #result?, #tap_err, #tap_ok, #to_json, #to_s, #unwrap!, #unwrap_err!, #unwrap_or, #unwrap_or_else
Constructor Details
This class inherits a constructor from Errgonomic::Result::Any
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Errgonomic::Result::Any
Instance Method Details
#err? ⇒ Boolean
Err is always err
632 633 634 |
# File 'lib/errgonomic/result.rb', line 632 def err? true end |
#inspect ⇒ Object
Render like Rust's Debug, delegating to the inner value's inspect.
649 650 651 |
# File 'lib/errgonomic/result.rb', line 649 def inspect "Err(#{value.inspect})" end |
#ok? ⇒ Boolean
Err is never ok
640 641 642 |
# File 'lib/errgonomic/result.rb', line 640 def ok? false end |