Struct shio::response::Response
[−]
[src]
pub struct Response { /* fields omitted */ }
Represents an HTTP response.
Methods
impl Response
[src]
fn new() -> Self
[src]
fn build() -> Builder
[src]
Creates a new builder-style object to manufacture a Response.
fn with<R: Responder>(responder: R) -> R::Result where
<R::Result as IntoFuture>::Error: Debug + Send + 'static,
[src]
<R::Result as IntoFuture>::Error: Debug + Send + 'static,
fn status(&self) -> StatusCode
[src]
Get the status.
fn set_status(&mut self, status: StatusCode)
[src]
Set the StatusCode
for this response.
fn body(self) -> Body
[src]
Take the body.
fn set_body<B: Into<Body>>(&mut self, body: B)
[src]
Set the body for this response.
fn headers_mut(&mut self) -> &mut Headers
[src]
Get a mutable reference to the headers.
Trait Implementations
impl From<Builder> for Response
[src]
impl Responder for Response
[src]
type Result = Self
fn to_response(self) -> Self::Result
[src]
impl Default for Response
[src]
impl IntoFuture for Response
[src]
type Item = Self
The item that the future may resolve with.
type Error = Error
The error that the future may resolve with.
type Future = FutureResult<Self::Item, Self::Error>
The future that this type can be converted into.
fn into_future(self) -> Self::Future
[src]
Consumes this object and produces a future.