Struct rocket::response::status::Accepted [] [src]

pub struct Accepted<R>(pub Option<R>);

Sets the status of the response to 202 (Accepted).

If a responder is supplied, the remainder of the response is delegated to it. If there is no responder, the body of the response will be empty.

Examples

A 202 Accepted response without a body:

use rocket::response::status;

let response = status::Accepted::<()>(None);

A 202 Accepted response with a body:

use rocket::response::status;

let response = status::Accepted(Some("processing"));

Trait Implementations

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

Formats the value using the given formatter.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Sets the status code of the response to 202 Accepted. If the responder is Some, it is used to finalize the response.

Returns Ok if a Response could be generated successfully. Otherwise, returns an Err with a failing Status. Read more