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<()>

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

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

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

fn broadcast<W>(self, other: W) -> Broadcast<Self, W> where W: Write

impl Read for Http11Message

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

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

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

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

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

fn bytes(self) -> Bytes<Self>

fn chars(self) -> Chars<Self>

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

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

fn tee<W>(self, out: W) -> Tee<Self, W> where W: Write

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 close_connection(&mut self) -> Result<()>

Derived Implementations

impl Debug for Http11Message

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