Struct predicates::predicate::AndPredicate
[−]
[src]
pub struct AndPredicate<M1, M2> where
M1: Predicate,
M2: Predicate<Item = M1::Item>, { /* fields omitted */ }
Predicate that combines two Predicate
s, returning the AND of the results.
This is created by the Predicate::and
function.
Methods
impl<M1, M2> AndPredicate<M1, M2> where
M1: Predicate,
M2: Predicate<Item = M1::Item>,
[src]
M1: Predicate,
M2: Predicate<Item = M1::Item>,
fn new(a: M1, b: M2) -> AndPredicate<M1, M2>
Create a new AndPredicate
over predicates a
and b
.
Trait Implementations
impl<M1: Debug, M2: Debug> Debug for AndPredicate<M1, M2> where
M1: Predicate,
M2: Predicate<Item = M1::Item>,
[src]
M1: Predicate,
M2: Predicate<Item = M1::Item>,
impl<M1, M2> Predicate for AndPredicate<M1, M2> where
M1: Predicate,
M2: Predicate<Item = M1::Item>,
[src]
M1: Predicate,
M2: Predicate<Item = M1::Item>,
type Item = M1::Item
The type that this Predicate
will accept for evaluating.
fn eval(&self, item: &Self::Item) -> bool
Execute this Predicate
against variable
, returning the resulting boolean. Read more
fn and<B>(self, other: B) -> AndPredicate<Self, B> where
B: Predicate<Item = Self::Item>,
Self: Sized,
B: Predicate<Item = Self::Item>,
Self: Sized,
Compute the logical AND of two Predicate
results, returning the result. Read more
fn or<B>(self, other: B) -> OrPredicate<Self, B> where
B: Predicate<Item = Self::Item>,
Self: Sized,
B: Predicate<Item = Self::Item>,
Self: Sized,
Compute the logical OR of two Predicate
results, returning the result. Read more
fn not(self) -> NotPredicate<Self> where
Self: Sized,
Self: Sized,
Compute the logical NOT of a Predicate
, returning the result. Read more
fn boxed(self) -> BoxPredicate<Self::Item> where
Self: Sized + Send + Sync + 'static,
Self: Sized + Send + Sync + 'static,
Returns a BoxPredicate
wrapper around this Predicate
type. Read more