pub enum PredicateNodeWire {
Show 17 variants
Exists {
key: TagKey,
},
Equals {
key: TagKey,
value: String,
},
NumericAtLeast {
key: TagKey,
threshold: f64,
},
NumericAtMost {
key: TagKey,
threshold: f64,
},
NumericInRange {
key: TagKey,
min: f64,
max: f64,
},
SemverAtLeast {
key: TagKey,
version: String,
},
SemverAtMost {
key: TagKey,
version: String,
},
SemverCompatible {
key: TagKey,
version: String,
},
StringPrefix {
key: TagKey,
prefix: String,
},
StringMatches {
key: TagKey,
pattern: String,
},
MetadataExists {
key: String,
},
MetadataEquals {
key: String,
value: String,
},
MetadataMatches {
key: String,
pattern: String,
},
MetadataNumericAtLeast {
key: String,
threshold: f64,
},
And {
children: Vec<u32>,
},
Or {
children: Vec<u32>,
},
Not {
child: u32,
},
}Expand description
One node in the flat predicate wire format. And/Or/Not
reference their children via u32 indices into the parent
PredicateWire’s nodes table.
Node ordering invariant: children always appear at lower indices than their parent (post-order serialization). The rebuild path enforces this to catch malformed wire payloads that attempt index cycles.
Variants§
Exists
Leaf: tag with this (axis, key) is present.
Equals
Leaf: tag’s value matches exactly.
NumericAtLeast
Leaf: tag’s value parses to f64 and is >= threshold.
NumericAtMost
Leaf: tag’s value parses to f64 and is <= threshold.
NumericInRange
Leaf: tag’s value parses to f64 and lies in [min, max].
SemverAtLeast
Leaf: tag’s value parses to a semver triple and is >= version.
SemverAtMost
Leaf: tag’s value parses to a semver triple and is <= version.
SemverCompatible
Leaf: tag’s value parses to a semver triple and is in the
same compatibility band as version.
StringPrefix
Leaf: tag’s value starts with prefix.
StringMatches
Leaf: tag’s value contains pattern as a substring.
MetadataExists
Leaf: metadata key is present.
MetadataEquals
Leaf: metadata value matches exactly.
MetadataMatches
Leaf: metadata value contains pattern as a substring.
MetadataNumericAtLeast
Leaf: metadata value parses to f64 and is >= threshold.
And
Composite: conjunction of children at the named indices.
Or
Composite: disjunction of children at the named indices.
Not
Composite: negation of the child at the named index.
Trait Implementations§
Source§impl Clone for PredicateNodeWire
impl Clone for PredicateNodeWire
Source§fn clone(&self) -> PredicateNodeWire
fn clone(&self) -> PredicateNodeWire
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more