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]
[+]

[]

Formats the value using the given formatter. Read more

impl<R: Clone> Clone for Custom<R>
[src]
[+]

[]

Returns a copy of the value. Read more

[]

Performs copy-assignment from source. Read more

impl<R: PartialEq> PartialEq for Custom<R>
[src]
[+]

[]

This method tests for self and other values to be equal, and is used by ==. Read more

[]

This method tests for !=.

impl<'r, R: Responder<'r>> Responder<'r> for Custom<R>
[src]
[+]

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

Auto Trait Implementations

impl<R> Send for Custom<R> where
    R: Send

impl<R> Sync for Custom<R> where
    R: Sync