pub struct Custom<R>(pub Status, pub R);
Creates a response with the given status code and underyling responder.
use rocket::response::status;
use rocket::http::Status;
let response = status::Custom(Status::ImATeapot, "Hi!");
Formats the value using the given formatter. Read more
Performs copy-assignment from source
. Read more
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Sets the status code of the response and then delegates the remainder of the
response to the wrapped responder.
Returns Ok
if a Response
could be generated successfully. Otherwise, returns an Err
with a failing Status
. Read more