pub fn evaluate_multifield_pattern(
facts: &TypedFacts,
field: &str,
operator: &MultifieldOp,
variable: Option<&str>,
value: Option<&FactValue>,
bindings: &HashMap<String, FactValue>,
) -> Option<HashMap<String, FactValue>>Expand description
Helper function to evaluate multi-field patterns in rules
This function combines the multi-field operation with variable binding. It returns both the result values and optional variable bindings.
§Arguments
facts- The facts to evaluate againstfield- The field name (e.g., “items”)operator- The multi-field operationvariable- Optional variable name for binding (e.g., “$?all_items”)value- Optional value for operations like Containsbindings- Existing variable bindings
§Returns
Some(HashMap<Variable, FactValue>) - New bindings including multi-field results
None - Pattern doesn’t match