Module tower_web::response [−][src]
Types and traits for responding to HTTP requests.
The Response trait is implemented by types that can be converted to an
HTTP response. Resource methods must return futures that yield types
implementing Response.
Currently, Response implementations are provided for the following
types:
More implementations can be added by submitting a PR.
Also, Response can be implemented for custom types by using the
[derive(Response)] proc macro. See library level documentation for
more details.
Structs
| ContentType |
Content type of a response |
| Context |
Context available when serializing the response. |
| DefaultSerializer |
Default serializer |
| SerdeResponse |
Use a Serde value as an HTTP response |
| SerializerContext |
Context passed to |
Traits
| Response |
Types that can be returned from resources as responses to HTTP requests. |
| Serializer |
Serialize an HTTP response body |