Skip to main content

evaluate_with_resolver

Function evaluate_with_resolver 

Source
pub fn evaluate_with_resolver<'a, F>(
    condition: &ConditionExpr,
    resolver: F,
) -> Result<bool>
where F: Fn(&str) -> Option<Cow<'a, Value>>,
Expand description

Evaluate a condition expression using a custom resolver for value lookups.

The resolver closure takes a dotted path (e.g., "contact.name") and returns the resolved value. This allows callers to provide merged views (e.g., local variables overlaid on global state) without cloning the entire state tree.