pub trait FnStatefulPredicateOps<T>: FnMut(&T) -> bool + Sized {
// Provided methods
fn and<P>(self, other: P) -> BoxStatefulPredicate<T>
where Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static { ... }
fn or<P>(self, other: P) -> BoxStatefulPredicate<T>
where Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static { ... }
fn not(self) -> BoxStatefulPredicate<T>
where Self: 'static,
T: 'static { ... }
fn nand<P>(self, other: P) -> BoxStatefulPredicate<T>
where Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static { ... }
fn xor<P>(self, other: P) -> BoxStatefulPredicate<T>
where Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static { ... }
fn nor<P>(self, other: P) -> BoxStatefulPredicate<T>
where Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static { ... }
}Expand description
Extension trait providing logical composition methods for stateful closures.
This trait is implemented for closures and function objects matching
FnMut(&T) -> bool, allowing direct composition into
BoxStatefulPredicate.
Provided Methods§
Sourcefn and<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
fn and<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
Sourcefn or<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
fn or<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
Sourcefn not(self) -> BoxStatefulPredicate<T>where
Self: 'static,
T: 'static,
fn not(self) -> BoxStatefulPredicate<T>where
Self: 'static,
T: 'static,
Returns a predicate representing logical negation.
This method consumes self and returns a predicate that negates the
closure result.
§Returns
A BoxStatefulPredicate representing logical negation.
Sourcefn nand<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
fn nand<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
Sourcefn xor<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
fn xor<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
Sourcefn nor<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
fn nor<P>(self, other: P) -> BoxStatefulPredicate<T>where
Self: 'static,
P: StatefulPredicate<T> + 'static,
T: 'static,
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.