Module rocket::response::status [] [src]

Contains types that set the status code and corresponding headers of a response.

These types are designed to make it easier to respond correctly with a given status code. Each type takes in the minimum number of parameters required to construct a proper response with that status code. Some types take in responders; when they do, the responder finalizes the response by writing out additional headers and, importantly, the body of the response.

Structs

Accepted

Sets the status of the response to 202 (Accepted).

BadRequest

Sets the status of the response to 400 (Bad Request).

Created

Sets the status of the response to 201 (Created).

Custom

Creates a response with the given status code and underyling responder.

NoContent

Sets the status of the response to 204 (No Content).

NotFound

Sets the status of the response to 404 (Not Found).

Reset

Sets the status of the response to 205 (Reset Content).