Skip to main content

Module methods

Module methods 

Source

Enums§

ResultCallableKind
Identifies map / map_err / and_then as the callable-taking Result methods each engine handles inline. Returns None for anything else so the caller can fall through to result_method or the standard dispatcher.

Functions§

array_method
Returns (return_value, optional_mutated_object)
bool_method
Method dispatch for Bool. Only the numeric coercions (true.to_int()1, etc.); type / to_str / inspect go through common_method before this is called.
common_method
Methods every value understands: introspection + stringification. Dispatched from call_method before the type-specific method tables so x.type(), x.to_str(), and x.inspect() work uniformly across every Value shape.
dict_method
is_builtin_result
True when receiver is a Value::EnumVariant whose type identity is the built-in Result. Shared by each engine so a user enum named Result in some module can’t accidentally steal the built-in method dispatch.
is_mutating_method
is_result_callable_method
iter_method
make_result_err
Same as make_result_ok but for Err.
make_result_ok
Build a Result::Ok(value) with the builtin’s module path so pattern matches against Result::Ok(_) fire regardless of which module the receiver came from. Mirror of the helper in builtins but specialised to the “wrap a value” case each engine’s callable dispatch uses.
numeric_method
Method dispatch for Int and Number receivers. Covers the math operations that used to be global builtins (abs, sqrt, sin, …) plus numeric coercions (to_int, to_float). Returns Err on argument errors or unknown method names — no fall-through.
result_method
Pure Result method dispatch. Handles is_ok, is_err, unwrap, expect, unwrap_or — the combinators whose implementation doesn’t need to invoke a user callable.
string_method