Trait Predicate

Source
pub trait Predicate<T>:
    'static
    + Send
    + Sync
    + Fn(&T) -> bool { }
Expand description

A predicate on a type <T>.

Predicate is an alias for any type implementing Fn(&T) -> bool (with a few extra bounds to support concurrency). It is used by Notifier to represent the preferences of subscribers when filtering messages of type T.

Implementors§

Source§

impl<F, T> Predicate<T> for F
where F: 'static + Send + Sync + Fn(&T) -> bool,