rama::matcher

Trait IteratorMatcherExt

pub trait IteratorMatcherExt<'a, M, State, Request>: Iterator<Item = &'a M> + 'a
where M: Matcher<State, Request>,
{ // Required methods fn matches_and( self, ext: Option<&mut Extensions>, ctx: &Context<State>, request: &Request, ) -> bool; fn matches_or( self, ext: Option<&mut Extensions>, ctx: &Context<State>, request: &Request, ) -> bool; }
Expand description

Extension to apply matcher operations to an Iterator of Matchers.

Required Methods§

fn matches_and( self, ext: Option<&mut Extensions>, ctx: &Context<State>, request: &Request, ) -> bool

Matches in case all Matcher elements match for the given Request within the specified crate::Context.

fn matches_or( self, ext: Option<&mut Extensions>, ctx: &Context<State>, request: &Request, ) -> bool

Matches in case any of the Matcher elements match for the given Request within the specified crate::Context.

Implementors§

§

impl<'a, I, M, State, Request> IteratorMatcherExt<'a, M, State, Request> for I
where I: Iterator<Item = &'a M> + 'a, M: Matcher<State, Request>,