[][src]Struct surf::headers::Headers

pub struct Headers<'a> { /* fields omitted */ }

A collection of HTTP Headers.

Methods

impl<'a> Headers<'a>[src]

pub fn get(&self, key: &'static str) -> Option<&str>[src]

Get a header.

pub fn insert(
    &mut self,
    key: &'static str,
    value: impl AsRef<str>
) -> Option<String>
[src]

Set a header.

Important traits for Iter<'a>
pub fn iter(&self) -> Iter[src]

Iterate over all headers.

Trait Implementations

impl<'a> IntoIterator for Headers<'a>[src]

type Item = (&'a str, &'a str)

The type of the elements being iterated over.

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?

impl<'a> Debug for Headers<'a>[src]

Auto Trait Implementations

impl<'a> Send for Headers<'a>

impl<'a> Unpin for Headers<'a>

impl<'a> Sync for Headers<'a>

impl<'a> !UnwindSafe for Headers<'a>

impl<'a> RefUnwindSafe for Headers<'a>

Blanket Implementations

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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