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

Expand description

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).

Conflict

Sets the status of the response to 409 (Conflict).

Created

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

Custom

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

Forbidden

Sets the status of the response to 403 (Forbidden).

NoContent

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

NotFound

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

Unauthorized

Sets the status of the response to 401 (Unauthorized).