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]
impl<R: Debug> Debug for Accepted<R>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<R: Clone> Clone for Accepted<R>
[src]
impl<R: Clone> Clone for Accepted<R>
fn clone(&self) -> Accepted<R>
[src]
fn clone(&self) -> Accepted<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 Accepted<R>
[src]
impl<R: PartialEq> PartialEq for Accepted<R>
fn eq(&self, other: &Accepted<R>) -> bool
[src]
fn eq(&self, other: &Accepted<R>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Accepted<R>) -> bool
[src]
fn ne(&self, other: &Accepted<R>) -> bool
This method tests for !=
.
impl<'r, R: Responder<'r>> Responder<'r> for Accepted<R>
[src]
impl<'r, R: Responder<'r>> Responder<'r> for Accepted<R>
Sets the status code of the response to 202 Accepted. If the responder is
Some
, it is used to finalize the response.