Struct predicates::BoxPredicate
[−]
[src]
pub struct BoxPredicate<Item: ?Sized>(_);
Predicate
that wraps another Predicate
as a trait object, allowing
sized storage of predicate types.
Methods
impl<Item> BoxPredicate<Item> where
Item: ?Sized,
[src]
Item: ?Sized,
pub fn new<P: Predicate<Item>>(inner: P) -> BoxPredicate<Item> where
P: Send + Sync + 'static,
[src]
P: Send + Sync + 'static,
Creates a new BoxPredicate
, a wrapper around a dynamically-dispatched
Predicate
type with useful trait impls.
Trait Implementations
impl<Item> Debug for BoxPredicate<Item> where
Item: ?Sized,
[src]
Item: ?Sized,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<Item> Display for BoxPredicate<Item> where
Item: ?Sized,
[src]
Item: ?Sized,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<Item> Predicate<Item> for BoxPredicate<Item> where
Item: ?Sized,
[src]
Item: ?Sized,
fn eval(&self, variable: &Item) -> bool
[src]
Execute this Predicate
against variable
, returning the resulting boolean. Read more
fn and<B>(self, other: B) -> AndPredicate<Self, B, Item> where
B: Predicate<Item>,
Self: Sized,
[src]
B: Predicate<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, Item> where
B: Predicate<Item>,
Self: Sized,
[src]
B: Predicate<Item>,
Self: Sized,
Compute the logical OR of two Predicate
results, returning the result. Read more
fn not(self) -> NotPredicate<Self, Item> where
Self: Sized,
[src]
Self: Sized,
Compute the logical NOT of a Predicate
, returning the result. Read more
fn boxed(self) -> BoxPredicate<Item> where
Self: Sized + Send + Sync + 'static,
[src]
Self: Sized + Send + Sync + 'static,
Returns a BoxPredicate
wrapper around this Predicate
type. Read more