[−][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. Any Mapper
that results in a
boolean value also implemens Matcher
.
Modules
request | Mappers that extract information from HTTP requests. |
response | Mappers that extract information from HTTP responses. |
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 |
Any | The |
AnyOf | The |
ContainsEntry | The |
Eq | The |
Inspect | The |
JsonDecoded | The |
KV | A key-value pair. |
Key | The |
Lowercase | The |
MapFn | The |
Matches | The |
Not | The |
UrlDecoded | The |
Value | The |
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. |
Matcher | Matcher is just a special case of Mapper that returns a boolean. It simply
provides the |
Functions
all_of | true if all the provided matchers return true. See the |
any | Always true. |
any_of | true if any of the provided matchers returns true. See the |
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 serde_json::Value to the next mapper. |
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. |
map_fn | pass the input to the provided |
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. |