pub enum Predicate {
Comparison {
field: FieldPath,
op: ComparisonOp,
value: FieldValue,
},
And(Vec<Self>),
Or(Vec<Self>),
Not(Box<Self>),
Range {
field: FieldPath,
lower: FieldValue,
upper: FieldValue,
},
Exists {
field: FieldPath,
},
}Expand description
Declarative routing predicate shape.
Predicate evaluation is implemented by later routing briefs. When evaluated, any predicate that references a missing message field must evaluate to false without returning an error.
Variants§
Comparison
Compare a field with a literal value using a comparison operator.
And(Vec<Self>)
Logical AND over zero or more child predicates.
Or(Vec<Self>)
Logical OR over zero or more child predicates.
Not(Box<Self>)
Logical negation of a single child predicate.
Range
Inclusive range check for numeric or text values.
Exists
Test whether a field is present in the message.
Trait Implementations§
impl StructuralPartialEq for Predicate
Auto Trait Implementations§
impl Freeze for Predicate
impl RefUnwindSafe for Predicate
impl Send for Predicate
impl Sync for Predicate
impl Unpin for Predicate
impl UnsafeUnpin for Predicate
impl UnwindSafe for Predicate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more