[][src]Trait httptest_core::Matcher

pub trait Matcher<IN>: Send + Debug where
    IN: ?Sized
{ fn matches(&mut self, input: &IN) -> bool; }

Matcher is just a special case of Mapper that returns a boolean. It simply provides the matches method rather than map as that reads a little better.

There is a blanket implementation for all Mappers that output bool values. You should never implement Matcher yourself, instead implement Mapper with a bool Out parameter.

Required methods

fn matches(&mut self, input: &IN) -> bool

true if the input matches.

Loading content...

Implementors

impl<T, IN> Matcher<IN> for T where
    T: Mapper<IN, Out = bool>, 
[src]

Loading content...