Struct hyper::http::h1::Http11Message [] [src]

pub struct Http11Message {
    // some fields omitted
}

An implementation of the HttpMessage trait for HTTP/1.1.

Methods

impl Http11Message

fn into_inner(self) -> Box<NetworkStream + Send>

Consumes the Http11Message and returns the underlying NetworkStream.

fn get_ref(&self) -> &NetworkStream + Send

Gets a mutable reference to the underlying NetworkStream, regardless of the state of the Http11Message.

fn get_mut(&mut self) -> &mut NetworkStream + Send

Gets a mutable reference to the underlying NetworkStream, regardless of the state of the Http11Message.

fn with_stream(stream: Box<NetworkStream + Send>) -> Http11Message

Creates a new Http11Message that will use the given NetworkStream for communicating to the peer.

fn flush_outgoing(&mut self) -> Result<()>

Flushes the current outgoing content and moves the stream into the stream property.

TODO It might be sensible to lift this up to the HttpMessage trait itself...

Trait Implementations

impl Write for Http11Message

fn write(&mut self, buf: &[u8]) -> Result<usize>

fn flush(&mut self) -> Result<()>

1.0.0fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

1.0.0fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>

1.0.0fn by_ref(&mut self) -> &mut Self

impl Read for Http11Message

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

1.0.0fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

1.0.0fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

1.6.0fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

1.0.0fn by_ref(&mut self) -> &mut Self

1.0.0fn bytes(self) -> Bytes<Self>

fn chars(self) -> Chars<Self>

1.0.0fn chain<R>(self, next: R) -> Chain<Self, R> where R: Read

1.0.0fn take(self, limit: u64) -> Take<Self>

impl HttpMessage for Http11Message

fn set_outgoing(&mut self, head: RequestHead) -> Result<RequestHead>

fn get_incoming(&mut self) -> Result<ResponseHead>

fn has_body(&self) -> bool

fn set_read_timeout(&self, dur: Option<Duration>) -> Result<()>

fn set_write_timeout(&self, dur: Option<Duration>) -> Result<()>

fn close_connection(&mut self) -> Result<()>

Derived Implementations

impl Debug for Http11Message

fn fmt(&self, arg_0: &mut Formatter) -> Result