Enum hyper::http::HttpWriter
[-]
[+]
[src]
pub enum HttpWriter<W: Writer> { ThroughWriter(W), ChunkedWriter(W), SizedWriter(W, u64), EmptyWriter(W), }
Writers to handle different Transfer-Encodings.
Variants
Methods
impl<W: Writer> HttpWriter<W>
fn unwrap(self) -> W
Unwraps the HttpWriter and returns the underlying Writer.
fn get_ref<'a>(&'a self) -> &'a W
Access the inner Writer.
fn get_mut<'a>(&'a mut self) -> &'a mut W
Access the inner Writer mutably.
Warning: You should not write to this directly, as you can corrupt the state.
fn end(self) -> IoResult<W>
Ends the HttpWriter, and returns the underlying Writer.
A final write()
is called with an empty message, and then flushed.
The ChunkedWriter variant will use this to write the 0-sized last-chunk.