Module response

Expand description

Types and traits for generating responses.

See crate::response for more details.

Structs§

AppendHeaders
Append headers to a response.
Csv
Wrapper used to create Csv Http Responses, as well as to extract Csv from Http Request bodies.
ErrorResponse
An IntoResponse-based error type
Form
Wrapper used to create Form Http Responses, as well as to extract Form from Http Request bodies.
Headers
Use typed Headers i a response.
Html
An HTML response.
Json
Wrapper used to create Json Http Responses, as well as to extract Json from Http Request bodies.
Redirect
Utility struct to easily create a redirect response.
ResponseParts
Parts of a response.
StaticResponseFactory
Wrapper that can be used to turn an IntoResponse type into something that implements Into<Response>.
TryIntoHeaderError
Error returned if converting a value to a header fails.

Traits§

IntoResponse
Trait for generating responses.
IntoResponseParts
Trait for adding headers and extensions to a response.

Type Aliases§

Response
Type alias for http::Response whose body type defaults to Body, the most common body type used with rama.
Result
An IntoResponse-based result type that uses ErrorResponse as the error type.