Expand description
Operator application for magic rule evaluation
This module provides functions for applying comparison and bitwise operators
to values during magic rule evaluation. It handles type-safe comparisons
between different Value variants. Supports XOR (^), NOT (~), and
any-value (x) matching in addition to equality, comparison, and bitwise AND.
Functions§
- apply_
any_ value - Apply any-value operator: always returns true (unconditional match).
- apply_
bitwise_ and - Apply bitwise AND operation for pattern matching
- apply_
bitwise_ and_ mask - Apply bitwise AND with mask for masked comparison
- apply_
bitwise_ not - Apply bitwise NOT then compare with right value
- apply_
bitwise_ not_ with_ width - Apply bitwise NOT with type-aware bit-width masking
- apply_
bitwise_ xor - Apply bitwise XOR operation for pattern matching
- apply_
equal - Apply equality comparison between two values
- apply_
greater_ equal - Apply greater-than-or-equal comparison between two values
- apply_
greater_ than - Apply greater-than comparison between two values
- apply_
less_ equal - Apply less-than-or-equal comparison between two values
- apply_
less_ than - Apply less-than comparison between two values
- apply_
not_ equal - Apply inequality comparison between two values
- apply_
operator - Apply operator to two values using the specified operator type
- apply_
value_ transform - Apply a magic-file pre-comparison
ValueTransformto a numeric value read from the file. The result is what the rule’s comparison operator sees, and what printf-style format specifiers (%d,%x, …) render into the message. - compare_
values - Compare two values and return their ordering, if comparable