Skip to main content

Predicate

Trait Predicate 

Source
pub trait Predicate: Send + Sync {
    // Required method
    fn matches(&self, exchange: &Exchange) -> bool;
}
Expand description

Predicate — a boolean test over an Exchange. Separate from Processor because EIPs like Filter/Choice compose predicates, not processors.

Required Methods§

Source

fn matches(&self, exchange: &Exchange) -> bool

Implementors§

Source§

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