Types and traits to build and send responses.
The return type of a Rocket handler can be any type that implements the Responder trait. Among other things, this module contains several such types.
Many of the built-in
Responder types chain responses: they take in
Responder and add, remove, or change information in the response.
In other words, many
Responder types are built to compose well. As a
result, you'll often have types of the form
A<B<C>> consisting of three
C. This is normal and encouraged as the type
names typically illustrate the intended response.
Contains types that set the Content-Type of a response.
Contains types that set the status code and correspoding headers of a response.
Sets the Content-Type of a
A failing response; simply forwards to the catcher for the given
Sets a "flash" cookie that will be removed when it is accessed. The anologous request type is FlashMessage.
A file with an associated name; responds with the Content-Type based on the file extension.
An empty redirect response to a given URL.
A response, as returned by
Type for easily building
Streams a response to a client from an arbitrary
The body of a response: can be sized or streamed/chunked.
The default size, in bytes, of a chunk for streamed responses.
Trait implemented by types that generate responses for clients.
Type alias for the