Enum hyper::http::h1::HttpReader
[−]
[src]
pub enum HttpReader<R> { SizedReader(R, u64), ChunkedReader(R, Option<u64>), EofReader(R), EmptyReader(R), }
Readers to handle different Transfer-Encodings.
If a message body does not include a Transfer-Encoding, it should include a Content-Length header.
Variants
SizedReader | A Reader used when a Content-Length header is passed with a positive integer. |
ChunkedReader | A Reader used when Transfer-Encoding is |
EofReader | A Reader used for responses that don't indicate a length or chunked. Note: This should only used for
|
EmptyReader | A Reader used for messages that should never have a body. |
Methods
impl<R: Read> HttpReader<R>
fn into_inner(self) -> R
Unwraps this HttpReader and returns the underlying Reader.
fn get_ref(&self) -> &R
Gets a borrowed reference to the underlying Reader.
fn get_mut(&mut self) -> &mut R
Gets a mutable reference to the underlying Reader.