[−][src]Struct http_header::ResponseHeader
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
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 inner(&self) -> &Header[src]
The underlying "raw" header
pub fn into_inner(self) -> Header[src]
Converts self into the underlying "raw" header
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 Debug for ResponseHeader[src]
impl TryFrom<Header> for ResponseHeader[src]
Auto Trait Implementations
impl Unpin for ResponseHeader
impl Sync for ResponseHeader
impl Send for ResponseHeader
impl UnwindSafe for ResponseHeader
impl RefUnwindSafe for ResponseHeader
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,