Predicate

Trait Predicate 

Source
pub trait Predicate<T> {
    // Required method
    fn apply(&self, value: &T) -> bool;
}
Expand description

Trait for types that can be used as predicate functions.

Required Methods§

Source

fn apply(&self, value: &T) -> bool

Apply the predicate to the given value.

Implementors§

Source§

impl<T, F> Predicate<T> for F
where F: Fn(&T) -> bool,