Struct predicates::BoxPredicate
[−]
[src]
pub struct BoxPredicate<T: ?Sized>(_);
Predicate
that wraps another Predicate
as a trait object, allowing
sized storage of predicate types.
Methods
impl<T: ?Sized> BoxPredicate<T>
[src]
fn new<P: Predicate<Item = T>>(inner: P) -> BoxPredicate<T> where
P: Send + Sync + 'static,
P: Send + Sync + 'static,
Creates a new BoxPredicate
, a wrapper around a dynamically-dispatched
Predicate
type with useful trait impls.
Trait Implementations
impl<T> Debug for BoxPredicate<T>
[src]
impl<T> Display for BoxPredicate<T>
[src]
impl<T: ?Sized> Predicate for BoxPredicate<T>
[src]
type Item = T
The type that this Predicate
will accept for evaluating.
fn eval(&self, variable: &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