Module httptest::matchers[][src]

Expand description

Matcher implementations.

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

Modules

Matchers that extract information from HTTP requests.

Macros

true if all the provided matchers return true.

true if any of the provided matchers return true.

Structs

The AllOf mapper returned by all_of()

The Any mapper returned by any()

The AnyOf mapper returned by any_of()

The Contains mapper returned by contains()

The Eq mapper returned by eq()

An ExecutionContext tracks how Matchers are chained together. There is a single public method called chain that when used to chain input from one matcher to another will allow tracking the flow of data across composable matchers.

The JsonDecoded mapper returned by json_decoded()

A key-value pair.

The Key mapper returned by key()

The Len mapper returned by len()

The Lowercase mapper returned by lowercase()

The Matches mapper returned by matches()

The Not mapper returned by not()

The UrlDecoded mapper returned by url_decoded()

The Value mapper returned by value()

Traits

Create a regex.

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 matchers are chained together to form a readable and flexible manipulation.

Functions

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

Always true.

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

true if any input element matches the provided mapper.

true if the input is equal to value.

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

extract the key from a key-value pair.

extract the length of the input.

lowercase the input and pass it to the next mapper.

true if the input matches the regex provided.

invert the result of the inner mapper.

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

extract the value from a key-value pair.