rama::matcher

Trait MatchFn

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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