Struct rocket::response::content::JSON [] [src]

pub struct JSON<R>(pub R);

Override the Content-Type of the response to JSON , or application/json .

Delagates the remainder of the response to the wrapped responder.

Trait Implementations

impl<R: Debug> Debug for JSON<R>
[src]

Formats the value using the given formatter.

impl<R: Clone> Clone for JSON<R>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<R: PartialEq> PartialEq for JSON<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 JSON<R>
[src]

Sets the Content-Type of the response 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