Skip to main content

match_pattern

Function match_pattern 

Source
pub fn match_pattern(value: &Value, pattern: &Pattern) -> Option<Vec<Binding>>
Expand description

Attempt to match value against pattern.

Returns extracted bindings on success, None on failure. Does not evaluate guards — guard evaluation requires the expression evaluator and is handled by the match-expression evaluator in interp.rs.