[][src]Module httptest::mappers

Mapper implementations.

This module contains mappers for composing a set of operations. The result of the composition usually results in a boolean.

Modules

request

Mappers that extract information from HTTP requests.

Macros

all_of

true if all the provided matchers return true.

any_of

true if any of the provided matchers return true.

Structs

AllOf

The AllOf mapper returned by all_of()

Any

The Any mapper returned by any()

AnyOf

The AnyOf mapper returned by any_of()

ContainsEntry

The ContainsEntry mapper returned by contains_entry()

Eq

The Eq mapper returned by eq()

Inspect

The Inspect mapper returned by inspect()

JsonDecoded

The JsonDecoded mapper returned by json_decoded()

KV

A key-value pair.

Key

The Key mapper returned by key()

Lowercase

The Lowercase mapper returned by lowercase()

Matches

The Matches mapper returned by matches()

Not

The Not mapper returned by not()

UrlDecoded

The UrlDecoded mapper returned by url_decoded()

Value

The Value mapper returned by value()

Traits

IntoRegex

Create a regex.

Mapper

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.

Functions

all_of

true if all the provided matchers return true. See the all_of! macro for convenient usage.

any

Always true.

any_of

true if any of the provided matchers returns true. See the any_of! macro for convenient usage.

contains_entry

true if the provided mapper returns true for any of the elements in the sequence.

eq

true if the input is equal to value.

inspect

inspect the input and pass it to the next mapper.

json_decoded

json decode the input and pass the resulting value to the inner mapper. If the input cannot be decoded a false value is returned. The inner mapper is required to return a bool value.

key

extract the key from a key-value pair.

kv

Create a KV from the provided key-value pair.

lowercase

lowercase the input and pass it to the next mapper.

matches

true if the input matches the regex provided.

not

invert the result of the inner mapper.

url_decoded

url decode the input and pass the resulting slice of key-value pairs to the next mapper.

value

extract the value from a key-value pair.