Struct http_types::headers::HeaderValues[][src]

pub struct HeaderValues { /* fields omitted */ }

A list of HeaderValues.

This always contains at least one header value.

Implementations

impl HeaderValues[src]

pub fn append(&mut self, other: &mut Self)[src]

Move all values from other into self, leaving other empty.

pub fn get(&self, index: usize) -> Option<&HeaderValue>[src]

Returns a reference or a value depending on the type of index.

pub fn get_mut(&mut self, index: usize) -> Option<&mut HeaderValue>[src]

Returns a mutable reference or a value depending on the type of index.

pub fn contains(&self, value: &HeaderValue) -> bool[src]

Returns true if there is a value corresponding to the specified HeaderValue in the list, false otherwise.

pub fn last(&self) -> &HeaderValue[src]

Returns the last HeaderValue.

pub fn iter(&self) -> Values<'_>

Notable traits for Values<'a>

impl<'a> Iterator for Values<'a> type Item = &'a HeaderValue;
[src]

An iterator visiting all header values in arbitrary order.

Methods from Deref<Target = HeaderValue>

pub fn as_str(&self) -> &str[src]

Get the header value as a &str

Trait Implementations

impl AsMut<HeaderValue> for HeaderValues[src]

impl AsRef<HeaderValue> for HeaderValues[src]

impl Clone for HeaderValues[src]

impl Debug for HeaderValues[src]

impl Deref for HeaderValues[src]

type Target = HeaderValue

The resulting type after dereferencing.

impl DerefMut for HeaderValues[src]

impl Display for HeaderValues[src]

impl From<HeaderValue> for HeaderValues[src]

impl From<HeaderValues> for HeaderValue[src]

impl FromIterator<HeaderValue> for HeaderValues[src]

impl<I: SliceIndex<[HeaderValue]>> Index<I> for HeaderValues[src]

type Output = I::Output

The returned type after indexing.

impl<'a> IntoIterator for &'a HeaderValues[src]

type Item = &'a HeaderValue

The type of the elements being iterated over.

type IntoIter = Values<'a>

Which kind of iterator are we turning this into?

impl<'a> PartialEq<&'_ String> for HeaderValues[src]

impl<'a> PartialEq<&'a str> for HeaderValues[src]

impl<'a> PartialEq<[&'a str]> for HeaderValues[src]

impl PartialEq<String> for HeaderValues[src]

impl PartialEq<str> for HeaderValues[src]

impl<'a> ToHeaderValues for &'a HeaderValues[src]

type Iter = Cloned<Values<'a>>

Returned iterator over header values which this type may correspond to.

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> Same<T> for T

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,