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, (Option<&mut Extensions>, Context, Request)> for F
where F: Fn(Option<&mut Extensions>, &Context, &Request) -> bool + Send + Sync + 'static,

§

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

§

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

§

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

§

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

§

impl<F, Request> MatchFn<Request, (Context, Request)> for F
where F: Fn(&Context, &Request) -> 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,