[][src]Struct http_header::ResponseHeader

pub struct ResponseHeader { /* fields omitted */ }

A HTTP response header

Methods

impl ResponseHeader[src]

pub fn version(&self) -> &Data<Ascii>[src]

The HTTP version

pub fn status(&self) -> u16[src]

The status code

pub fn reason(&self) -> &Data<Ascii>[src]

The status reason

impl ResponseHeader[src]

pub fn field(&self, key: &Data<HeaderFieldKey>) -> Option<&Data<Ascii>>[src]

Gets the field for key if any

pub fn fields(&self) -> &HashMap<Data<HeaderFieldKey>, Data<Ascii>>[src]

Returns an iterator over all header fields

pub fn write(&self, sink: impl WriteExt) -> Result<usize, Error>[src]

Serializes and writes the header to sink and returns the amount of bytes written

pub fn to_vec(&self) -> Vec<u8>[src]

Serializes the header into a vector

Trait Implementations

impl AsRef<Header> for ResponseHeader[src]

impl Clone for ResponseHeader[src]

impl From<ResponseHeader> for Header[src]

impl Debug for ResponseHeader[src]

impl TryFrom<Header> for ResponseHeader[src]

type Error = HttpError

The type returned in the event of a conversion error.

fn try_from(header: Header) -> Result<Self, Self::Error>[src]

Tries to create a RequestHeader from a Header

Auto Trait Implementations

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for 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.

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

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

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