Expand description
Pattern Matching Helpers
Functions for pattern matching on Result (Ok/Err) and Option (Some/None) types.
Functions§
- jit_
pattern_ check_ constructor - Check if object matches Ok/Err constructor pattern mode: 0 = Ok (check “Ok” or “value” key), 1 = Err (check “Err” or “error” key) Returns TAG_BOOL_TRUE if matches, TAG_BOOL_FALSE otherwise
- jit_
pattern_ extract_ constructor - Extract value from Ok/Err constructor pattern mode: 0 = Ok (try “Ok” then “value”), 1 = Err (try “Err” then “error”) Returns the extracted value or TAG_NULL if not found