pub trait Conjuctive<'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
conjuctive 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("foo".equals("bar"), "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("foo".equals("bar"), "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"))
)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.