#[non_exhaustive]pub struct CompoundFilter {
pub op: LogicalOp,
pub filters: Vec<FilterExpr>,
}Expand description
A compound filter combining multiple expressions with a logical operator.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.op: LogicalOpThe logical operator (AND, OR, NOT) to combine filters.
filters: Vec<FilterExpr>The filter expressions to combine.
Implementations§
Source§impl CompoundFilter
impl CompoundFilter
Sourcepub const fn and(filters: Vec<FilterExpr>) -> Self
pub const fn and(filters: Vec<FilterExpr>) -> Self
Create an AND compound filter.
Sourcepub const fn or(filters: Vec<FilterExpr>) -> Self
pub const fn or(filters: Vec<FilterExpr>) -> Self
Create an OR compound filter.
Sourcepub fn not(filter: FilterExpr) -> Self
pub fn not(filter: FilterExpr) -> Self
Create a NOT compound filter (wraps a single filter).
Trait Implementations§
Source§impl Clone for CompoundFilter
impl Clone for CompoundFilter
Source§fn clone(&self) -> CompoundFilter
fn clone(&self) -> CompoundFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompoundFilter
impl Debug for CompoundFilter
Source§impl PartialEq for CompoundFilter
impl PartialEq for CompoundFilter
impl StructuralPartialEq for CompoundFilter
Auto Trait Implementations§
impl Freeze for CompoundFilter
impl RefUnwindSafe for CompoundFilter
impl Send for CompoundFilter
impl Sync for CompoundFilter
impl Unpin for CompoundFilter
impl UnwindSafe for CompoundFilter
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