Trait quaint::ast::Conjunctive
source · pub trait Conjunctive<'a> {
// Required methods
fn and<E>(self, other: E) -> ConditionTree<'a>
where E: Into<Expression<'a>>;
fn or<E>(self, other: E) -> ConditionTree<'a>
where E: Into<Expression<'a>>;
fn not(self) -> ConditionTree<'a>;
}
Expand description
AND
, OR
and NOT
conjunctive implementations.
Required Methods§
sourcefn and<E>(self, other: E) -> ConditionTree<'a>where
E: Into<Expression<'a>>,
fn and<E>(self, other: E) -> ConditionTree<'a>where E: Into<Expression<'a>>,
Builds an AND
condition having self
as the left leaf and other
as the right.
assert_eq!(
"foo".equals("bar").and("wtf".less_than(3)),
ConditionTree::And(vec![
Expression::from("foo".equals("bar")),
Expression::from("wtf".less_than(3))
])
)
sourcefn or<E>(self, other: E) -> ConditionTree<'a>where
E: Into<Expression<'a>>,
fn or<E>(self, other: E) -> ConditionTree<'a>where E: Into<Expression<'a>>,
Builds an OR
condition having self
as the left leaf and other
as the right.
assert_eq!(
"foo".equals("bar").or("wtf".less_than(3)),
ConditionTree::Or(vec![
Expression::from("foo".equals("bar")),
Expression::from("wtf".less_than(3))
])
)
sourcefn not(self) -> ConditionTree<'a>
fn not(self) -> ConditionTree<'a>
Builds a NOT
condition having self
as the condition.
assert_eq!(
"foo".equals("bar").not(),
ConditionTree::not("foo".equals("bar"))
)
Object Safety§
This trait is not object safe.