Struct sig_proxy::middleware::proxy::prelude::headers::HeaderValues[]

pub struct HeaderValues { /* fields omitted */ }
Expand description

A list of HeaderValues.

This always contains at least one header value.

Implementations

impl HeaderValues

pub fn append(&mut self, other: &mut HeaderValues)

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

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

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

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

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

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

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

pub fn last(&self) -> &HeaderValue

Returns the last HeaderValue.

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

Notable traits for Values<'a>

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

An iterator visiting all header values in arbitrary order.

Methods from Deref<Target = HeaderValue>

pub fn as_str(&self) -> &str

Get the header value as a &str

Trait Implementations

impl AsMut<HeaderValue> for HeaderValues

pub fn as_mut(&mut self) -> &mut HeaderValue

Performs the conversion.

impl AsRef<HeaderValue> for HeaderValues

pub fn as_ref(&self) -> &HeaderValue

Performs the conversion.

impl Clone for HeaderValues

pub fn clone(&self) -> HeaderValues

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for HeaderValues

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

impl Deref for HeaderValues

type Target = HeaderValue

The resulting type after dereferencing.

pub fn deref(&self) -> &HeaderValue

Dereferences the value.

impl DerefMut for HeaderValues

pub fn deref_mut(&mut self) -> &mut HeaderValue

Mutably dereferences the value.

impl Display for HeaderValues

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

impl From<HeaderValue> for HeaderValues

pub fn from(other: HeaderValue) -> HeaderValues

Performs the conversion.

impl From<HeaderValues> for HeaderValue

pub fn from(other: HeaderValues) -> HeaderValue

Performs the conversion.

impl FromIterator<HeaderValue> for HeaderValues

pub fn from_iter<I>(iter: I) -> HeaderValues where
    I: IntoIterator<Item = HeaderValue>, 

Creates a value from an iterator. Read more

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

type Output = <I as SliceIndex<[HeaderValue]>>::Output

The returned type after indexing.

pub fn index(&self, index: I) -> &<HeaderValues as Index<I>>::Output

Performs the indexing (container[index]) operation. Read more

impl<'a> IntoIterator for &'a HeaderValues

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?

pub fn into_iter(self) -> <&'a HeaderValues as IntoIterator>::IntoIter

Creates an iterator from a value. Read more

impl<'a, '_> PartialEq<&'_ String> for HeaderValues

pub fn eq(&self, other: &&String) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> PartialEq<&'a str> for HeaderValues

pub fn eq(&self, other: &&'a str) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

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

pub fn eq(&self, other: &[&'a str]) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<String> for HeaderValues

pub fn eq(&self, other: &String) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl PartialEq<str> for HeaderValues

pub fn eq(&self, other: &str) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<'a> ToHeaderValues for &'a HeaderValues

type Iter = Cloned<Values<'a>>

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

pub fn to_header_values(
    &self
) -> Result<<&'a HeaderValues as ToHeaderValues>::Iter, Error>

Converts this object to an iterator of resolved HeaderValues.

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V