[−][src]Struct http_header::header::ResponseHeader
A HTTP response header
Methods
impl<'a> ResponseHeader<'a>
[src]
pub fn version(&'a self) -> Result<Data<'a, Ascii>, HttpError>
[src]
The HTTP version
pub fn status(&'a self) -> Result<u16, HttpError>
[src]
The status code
pub fn reason(&'a self) -> Result<Data<'a, Ascii>, HttpError>
[src]
The status reason
pub fn field(&self, key: Data<'a, HeaderFieldKey>) -> Option<&Data<'a, Ascii>>
[src]
Gets the field for key
if any
pub fn fields(&self) -> &HashMap<Data<'a, HeaderFieldKey>, Data<'a, Ascii>>
[src]
Returns an iterator over all header fields
pub fn write(&self, sink: &mut dyn Write) -> 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
Auto Trait Implementations
impl<'a> Send for ResponseHeader<'a>
impl<'a> Sync for ResponseHeader<'a>
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,