Skip to main content

Module response

Module response 

Source
Expand description

The outgoing Response, and IntoResponse for returning one from a handler.

A controller action rarely wants to build a Response by hand, so anything reasonable converts into one: a string, a serde_json::Value, a Json<T>, a Redirect, a StatusCode, a Result, or a tuple pairing a status with any of those.

Structs§

Html
A text/html body.
Json
An application/json body.
Redirect
A redirect response.
RenderedError
Marks a response as having been rendered from a framework Error, and carries the parts needed to render it differently.
Response
An outgoing HTTP response.

Traits§

IntoResponse
Anything a handler can return.