pub enum ConditionGroup {
Single(Condition),
Compound {
left: Box<ConditionGroup>,
operator: LogicalOperator,
right: Box<ConditionGroup>,
},
Not(Box<ConditionGroup>),
}Expand description
Group of conditions with logical operators
Variants§
Single(Condition)
A single condition
Compound
A compound condition with two sub-conditions and a logical operator
Fields
§
left: Box<ConditionGroup>The left side condition
§
operator: LogicalOperatorThe logical operator (AND, OR)
§
right: Box<ConditionGroup>The right side condition
Not(Box<ConditionGroup>)
A negated condition group
Implementations§
Source§impl ConditionGroup
impl ConditionGroup
Sourcepub fn and(left: ConditionGroup, right: ConditionGroup) -> Self
pub fn and(left: ConditionGroup, right: ConditionGroup) -> Self
Create a compound condition using logical AND operator
Sourcepub fn or(left: ConditionGroup, right: ConditionGroup) -> Self
pub fn or(left: ConditionGroup, right: ConditionGroup) -> Self
Create a compound condition using logical OR operator
Sourcepub fn not(condition: ConditionGroup) -> Self
pub fn not(condition: ConditionGroup) -> Self
Create a negated condition using logical NOT operator
Trait Implementations§
Source§impl Clone for ConditionGroup
impl Clone for ConditionGroup
Source§fn clone(&self) -> ConditionGroup
fn clone(&self) -> ConditionGroup
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 moreAuto Trait Implementations§
impl Freeze for ConditionGroup
impl RefUnwindSafe for ConditionGroup
impl Send for ConditionGroup
impl Sync for ConditionGroup
impl Unpin for ConditionGroup
impl UnwindSafe for ConditionGroup
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