[−][src]Struct gotham_restful::Response
A response, used to create the final gotham response from.
Fields
status: StatusCode
body: Body
mime: Option<Mime>
Methods
impl Response
[src]
pub fn new<B: Into<Body>>(
status: StatusCode,
body: B,
mime: Option<Mime>
) -> Self
[src]
status: StatusCode,
body: B,
mime: Option<Mime>
) -> Self
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,