Expand description
Rule evaluation engine. Synchronous, bounded, no I/O.
Regex evaluation is checked against a 100 ms budget after matching. Invalid regex patterns are treated as non-matching (never panic).
Structs§
- Eval
Context - Caller-supplied runtime context for
evaluate_plan. - Eval
Outcome - The result of evaluating a rule set with
evaluate_plan: the matched rule (if any), the planned outcomes, and any warnings. - Regex
Cache - Cache of compiled regex patterns keyed by the raw pattern string. Prevents re-compilation on every evaluation pass.
Enums§
- Eval
Warning - A non-fatal observation made during
evaluate_plan. Evaluation never fails: misconfigured or exotic actions are reported as warnings while the rest of the plan still executes.
Functions§
- ascii_
numeric_ eq i;ascii-numericequality (RFC 4790): both strings must consist solely of ASCII digits and be numerically equal (leading zeros ignored). The empty string compares equal only to the empty string; any non-numeric operand never matches.- evaluate_
condition - Evaluate a single condition against a message.
- evaluate_
plan - Evaluate rules against a message and resolve them into execution-ready outcomes.
- evaluate_
rule - Evaluate a filter rule against a message.
- extract_
address_ part - Extract the portion of an address selected by an
AddressPart.:localpartis everything before the last@(the whole value when there is no@);:domainis everything after the last@(empty when there is no@). - field_
value - Resolve the string value of a condition field on a message.
- glob_
match - Simple glob matching supporting
*(any chars) and?(single char). - sort_
rules_ by_ priority - Sort rules by priority (ascending = highest priority first).