pub enum Expr {
And(Box<Expr>, Box<Expr>),
Or(Box<Expr>, Box<Expr>),
Not(Box<Expr>),
Cmp {
lhs: Operand,
op: CmpOp,
rhs: Operand,
},
Between {
field: Operand,
low: Operand,
high: Operand,
negated: bool,
},
}Expand description
A filter expression. A recursive tree, produced by crate::parse.
Variants§
And(Box<Expr>, Box<Expr>)
Combined AND expression.
Or(Box<Expr>, Box<Expr>)
Kombinierter OR-Ausdruck.
Not(Box<Expr>)
NOT-Negation.
Cmp
Comparison between two operands.
Between
field BETWEEN low AND high (spec §B.2.1 BetweenPredicate).
Equivalent to field >= low AND field <= high. negated = true
for NOT BETWEEN.
Implementations§
Source§impl Expr
impl Expr
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Recursive sub-expression count (useful for tests / metrics).
Sourcepub fn collect_param_indices(&self) -> Vec<u32>
pub fn collect_param_indices(&self) -> Vec<u32>
Collects all parameter indices that occur in the expression.
Trait Implementations§
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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