Matcher

Trait Matcher 

Source
pub trait Matcher<V>:
    DynClone
    + Debug
    + Send
    + Sync {
    // Required method
    fn run(&self, value: &V) -> bool;
}
Expand description

A Matcher is a type that contains a “run” method which returns true/false if value V matches a filter.

Required Methods§

Source

fn run(&self, value: &V) -> bool

Implementations on Foreign Types§

Source§

impl<V> Matcher<V> for bool

Implementing Matcher for bool allows a Box::new(true|false) convenience.

Source§

fn run(&self, _value: &V) -> bool

Implementors§

Source§

impl<V, T> Matcher<V> for Run<V, T>
where V: Debug + Send + Sync + Clone, T: Fn(&V) -> bool + Send + Sync + Clone,