[][src]Struct htt::Response

pub struct Response {
    pub version: Version,
    pub status: Status,
    pub headers: HeaderMap,
}

Fields

version: Versionstatus: Statusheaders: HeaderMap

Methods

impl Response[src]

pub fn send<R, W>(&self, data: &mut R, target: &mut W) -> IoResult<u64> where
    R: Read,
    W: Write
[src]

Sends this response with optional data

If you don't have data to send, you can use empty().

Result: total bytes sent.

pub fn recv<R, W>(src: &mut R, data: &mut W) -> IoResult<Self> where
    R: Read,
    W: Write
[src]

Receives a response

  • src is used to read data.
  • data is for writing response's data to.

Trait Implementations

impl Debug for Response[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.