Skip to main content

Module eval

Module eval 

Source
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§

EvalContext
Caller-supplied runtime context for evaluate_plan.
EvalOutcome
The result of evaluating a rule set with evaluate_plan: the matched rule (if any), the planned outcomes, and any warnings.
RegexCache
Cache of compiled regex patterns keyed by the raw pattern string. Prevents re-compilation on every evaluation pass.

Enums§

EvalWarning
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-numeric equality (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. :localpart is everything before the last @ (the whole value when there is no @); :domain is 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).