Struct hyper::server::response::ResponseExperimental
[-]
[+]
[src]
pub struct Response<W> { pub version: HttpVersion, // some fields omitted }
The outgoing half for a Tcp connection, created by a Server
and given to a Handler
.
Fields
version | The HTTP version of this response. |
Methods
impl<W> Response<W>
fn status(&self) -> StatusCode
The status of this response.
fn headers(&self) -> &Headers
The headers of this response.
fn construct(version: HttpVersion, body: HttpWriter<BufferedWriter<Box<NetworkStream + Send>>>, status: StatusCode, headers: Headers) -> Response<Fresh>
Construct a Response from its constituent parts.
impl Response<Fresh>
fn new<S: NetworkStream>(stream: S) -> Response<Fresh>
Creates a new Response that can be used to write to a network stream.
fn start(self) -> IoResult<Response<Streaming>>
Consume this Response
fn status_mut(&mut self) -> &mut StatusCode
Get a mutable reference to the status.
fn headers_mut(&mut self) -> &mut Headers
Get a mutable reference to the Headers.
fn deconstruct(self) -> (HttpVersion, HttpWriter<BufferedWriter<Box<NetworkStream + Send>>>, StatusCode, Headers)
Deconstruct this Response into its constituent parts.