[][src]Struct gotham_restful::Response

pub struct Response {
    pub status: StatusCode,
    pub body: Body,
    pub mime: Option<Mime>,
}

A response, used to create the final gotham response from.

Fields

status: StatusCodebody: Bodymime: Option<Mime>

Methods

impl Response[src]

pub fn new<B: Into<Body>>(
    status: StatusCode,
    body: B,
    mime: Option<Mime>
) -> Self
[src]

Create a new Response from raw data.

pub fn json<B: Into<Body>>(status: StatusCode, body: B) -> Self[src]

Create a Response with mime type json from already serialized data.

pub fn no_content() -> Self[src]

Create a 204 No Content Response.

Auto Trait Implementations

impl Send for Response

impl !Sync for Response

impl Unpin for Response

impl !UnwindSafe for Response

impl !RefUnwindSafe for Response

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]