Skip to main content

Matcher

Trait Matcher 

Source
pub trait Matcher {
    // Required method
    fn matches(&self, ctx: impl MatchContext) -> bool;
}
Expand description

A trait that defines a matcher for determining whether a handler - member of a handler-chain (ChainedHandler) should be invoked for a specific operation.

Required Methods§

Source

fn matches(&self, ctx: impl MatchContext) -> bool

Return true if the corresponding handler should be invoked for the provided context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> Matcher for &T
where T: Matcher,

Source§

fn matches(&self, ctx: impl MatchContext) -> bool

Implementors§