[][src]Trait httptest_core::Mapper

pub trait Mapper<IN>: Send + Debug where
    IN: ?Sized
{ type Out; fn map(&mut self, input: &IN) -> Self::Out; }

The core trait. Defines how an input value should be turned into an output value. This allows for a flexible pattern of composition where two or more mappers are chained together to form a readable and flexible manipulation.

There is a special case of a Mapper that outputs a bool that is called a Matcher.

Associated Types

type Out

The output type.

Loading content...

Required methods

fn map(&mut self, input: &IN) -> Self::Out

Map an input to output.

Loading content...

Implementations on Foreign Types

impl<K, V, KMapper, VMapper> Mapper<(K, V)> for (KMapper, VMapper) where
    KMapper: Mapper<K, Out = bool>,
    VMapper: Mapper<V, Out = bool>, 
[src]

type Out = bool

Loading content...

Implementors

Loading content...