Struct shio::response::Response
[−]
[src]
pub struct Response { /* fields omitted */ }
Represents an HTTP response.
Methods
impl Response
[src]
fn new() -> Response
fn build() -> Builder
Creates a new builder-style object to manufacture a Response.
fn with<R: Responder>(responder: R) -> Response
fn status(&self) -> StatusCode
Get the status.
fn set_status(&mut self, status: StatusCode)
Set the StatusCode
for this response.
fn body(self) -> Body
Take the body.
fn set_body<B: Into<Body>>(&mut self, body: B)
Set the body for this response.
fn headers_mut(&mut self) -> &mut Headers
Get a mutable reference to the headers.
Trait Implementations
impl From<Builder> for Response
[src]
impl Default for Response
[src]
impl IntoFuture for Response
[src]
type Item = Response
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
Consumes this object and produces a future.