Skip to main content

Module predicate

Module predicate 

Source

Structs§

AllOfP
AnyOfP
CheckMap
NotP
PredicateInst

Enums§

CompiledOperator
CompiledValue
FieldPath
FieldValueType
Value type a FieldPath reads from. Drives the operator compatibility matrix in spec/crates/core.md § Predicate and the coerce_value validator in the lower pass.
Operator
OperatorFamily
Operator family used by the type-compatibility matrix. Mirrors the rows of spec/crates/core.md’s “Operator × value type compatibility” table — operators in the same row share a compatibility set.
Predicate
PredicateView
Value

Constants§

MAX_PREDICATE_DEPTH
Maximum nesting depth allowed in a match predicate tree.
REGEX_BACKTRACK_LIMIT
Maximum backtracks the fancy-regex matcher is allowed per call. Rules carrying a matches operator are compiled with this limit baked in; the matcher returns Err(Error::BacktrackLimitExceeded) when a pathological input would otherwise spin (RegEx DoS).
REGEX_DELEGATE_SIZE_LIMIT
Cap on the size (in bytes) that fancy-regex is allowed to allocate for delegate NFA/DFA structures. Caps the worst-case memory a single rule can demand at compile time.
REGEX_PATTERN_MAX_BYTES
REGEX_SMOKE_TEST_INPUT_LEN
Adversarial smoke-test input used by the compile-time check on every matches regex: a long run of a plus a non-matching suffix, which is the classic catastrophic-backtracking trigger for patterns like (a+)+b.

Functions§

check_max_depth
Reject predicate trees whose nesting depth exceeds MAX_PREDICATE_DEPTH. Uses an explicit stack so the depth check itself runs in O(n) time and O(depth) space without recursion.