pub trait MatchFn<S, Request, A>: Sealed<S, Request, A> + Send + Sync + 'static {
// Required method
fn call(
&self,
ext: Option<&mut Extensions>,
ctx: &Context<S>,
req: &Request,
) -> bool;
}
Expand description
Required Methods§
fn call(
&self,
ext: Option<&mut Extensions>,
ctx: &Context<S>,
req: &Request,
) -> bool
fn call( &self, ext: Option<&mut Extensions>, ctx: &Context<S>, req: &Request, ) -> bool
returns true on a match, false otherwise
ext
is None in case the callee is not interested in collecting potential
match metadata gathered during the matching process. An example of this
path parameters for an http Uri matcher.