Struct hyper::Response 
                   
                       [−]
                   
               [src]
pub struct Response<B = Body> { /* fields omitted */ }
An HTTP Response
Methods
impl<B> Response<B>[src]
fn new() -> Response<B>[src]
Constructs a default response
fn version(&self) -> HttpVersion[src]
Get the HTTP version of this response.
fn headers(&self) -> &Headers[src]
Get the headers from the response.
fn headers_mut(&mut self) -> &mut Headers[src]
Get a mutable reference to the headers.
fn status(&self) -> StatusCode[src]
Get the status from the server.
fn set_status(&mut self, status: StatusCode)[src]
Set the StatusCode for this response.
fn with_status(self, status: StatusCode) -> Self[src]
Set the status and move the Response.
Useful for the "builder-style" pattern.
fn with_header<H: Header>(self, header: H) -> Self[src]
Set a header and move the Response.
Useful for the "builder-style" pattern.
fn with_headers(self, headers: Headers) -> Self[src]
Set the headers and move the Response.
Useful for the "builder-style" pattern.
fn set_body<T: Into<B>>(&mut self, body: T)[src]
Set the body.
fn with_body<T: Into<B>>(self, body: T) -> Self[src]
Set the body and move the Response.
Useful for the "builder-style" pattern.
fn body_ref(&self) -> Option<&B>[src]
Read the body.