Trait MatchFn

pub trait MatchFn<Request, A>:
    Sealed<Request, A>
    + Send
    + Sync
    + 'static { }
Expand description

A MatchFn is a Matcher implemented using a function.

You do not need to implement this trait yourself. Instead, you need to use the match_fn function to create a MatchFn.

Implementors§

§

impl<F, Request> MatchFn<Request, ((Extensions,), (Request,))> for F
where F: Fn(Option<&mut Extensions>, &Request) -> bool + Send + Sync + 'static,

§

impl<F, Request> MatchFn<Request, ((Extensions,), ())> for F
where F: Fn(Option<&mut Extensions>) -> bool + Send + Sync + 'static,

§

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

§

impl<F, Request> MatchFn<Request, ((), ())> for F
where F: Fn() -> bool + Send + Sync + 'static,