Skip to main content

evaluate_rule

Function evaluate_rule 

Source
pub fn evaluate_rule<F: Filterable + ?Sized>(
    rule: &FilterRule,
    msg: &F,
    regex_cache: &RegexCache,
) -> bool
Expand description

Evaluate a filter rule against a message.

Returns true when the rule matches (all/any conditions satisfied). Disabled rules and rules without conditions always return false.

ยงPanics

Never panics. Invalid regex patterns are treated as non-matching.