Struct rocket::response::status::Custom [−][src]
pub struct Custom<R>(pub Status, pub R);
Creates a response with the given status code and underyling responder.
Example
use rocket::response::status; use rocket::http::Status; let response = status::Custom(Status::ImATeapot, "Hi!");
Trait Implementations
impl<R: Debug> Debug for Custom<R>[src]
impl<R: Debug> Debug for Custom<R>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<R: Clone> Clone for Custom<R>[src]
impl<R: Clone> Clone for Custom<R>fn clone(&self) -> Custom<R>[src]
fn clone(&self) -> Custom<R>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<R: PartialEq> PartialEq for Custom<R>[src]
impl<R: PartialEq> PartialEq for Custom<R>fn eq(&self, other: &Custom<R>) -> bool[src]
fn eq(&self, other: &Custom<R>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Custom<R>) -> bool[src]
fn ne(&self, other: &Custom<R>) -> boolThis method tests for !=.
impl<'r, R: Responder<'r>> Responder<'r> for Custom<R>[src]
impl<'r, R: Responder<'r>> Responder<'r> for Custom<R>Sets the status code of the response and then delegates the remainder of the response to the wrapped responder.