pub struct HeaderValues { /* private fields */ }Expand description
A list of HeaderValues.
This always contains at least one header value.
Implementations§
Source§impl HeaderValues
 
impl HeaderValues
Sourcepub fn append(&mut self, other: &mut Self)
 
pub fn append(&mut self, other: &mut Self)
Move all values from other into self, leaving other empty.
Sourcepub fn get(&self, index: usize) -> Option<&HeaderValue>
 
pub fn get(&self, index: usize) -> Option<&HeaderValue>
Returns a reference or a value depending on the type of index.
Sourcepub fn get_mut(&mut self, index: usize) -> Option<&mut HeaderValue>
 
pub fn get_mut(&mut self, index: usize) -> Option<&mut HeaderValue>
Returns a mutable reference or a value depending on the type of index.
Sourcepub fn contains(&self, value: &HeaderValue) -> bool
 
pub fn contains(&self, value: &HeaderValue) -> bool
Returns true if there is a value corresponding to the specified HeaderValue in the list,
false otherwise.
Sourcepub fn last(&self) -> &HeaderValue
 
pub fn last(&self) -> &HeaderValue
Returns the last HeaderValue.
Methods from Deref<Target = HeaderValue>§
Trait Implementations§
Source§impl AsMut<HeaderValue> for HeaderValues
 
impl AsMut<HeaderValue> for HeaderValues
Source§fn as_mut(&mut self) -> &mut HeaderValue
 
fn as_mut(&mut self) -> &mut HeaderValue
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<HeaderValue> for HeaderValues
 
impl AsRef<HeaderValue> for HeaderValues
Source§fn as_ref(&self) -> &HeaderValue
 
fn as_ref(&self) -> &HeaderValue
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for HeaderValues
 
impl Clone for HeaderValues
Source§fn clone(&self) -> HeaderValues
 
fn clone(&self) -> HeaderValues
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moreSource§impl Debug for HeaderValues
 
impl Debug for HeaderValues
Source§impl Deref for HeaderValues
 
impl Deref for HeaderValues
Source§type Target = HeaderValue
 
type Target = HeaderValue
The resulting type after dereferencing.
Source§fn deref(&self) -> &HeaderValue
 
fn deref(&self) -> &HeaderValue
Dereferences the value.
Source§impl DerefMut for HeaderValues
 
impl DerefMut for HeaderValues
Source§fn deref_mut(&mut self) -> &mut HeaderValue
 
fn deref_mut(&mut self) -> &mut HeaderValue
Mutably dereferences the value.
Source§impl Display for HeaderValues
 
impl Display for HeaderValues
Source§impl From<HeaderValue> for HeaderValues
 
impl From<HeaderValue> for HeaderValues
Source§fn from(other: HeaderValue) -> Self
 
fn from(other: HeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<HeaderValues> for HeaderValue
 
impl From<HeaderValues> for HeaderValue
Source§fn from(other: HeaderValues) -> Self
 
fn from(other: HeaderValues) -> Self
Converts to this type from the input type.
Source§impl From<Vec<HeaderValue>> for HeaderValues
 
impl From<Vec<HeaderValue>> for HeaderValues
Source§fn from(headers: Vec<HeaderValue>) -> Self
 
fn from(headers: Vec<HeaderValue>) -> Self
Converts to this type from the input type.
Source§impl FromIterator<HeaderValue> for HeaderValues
 
impl FromIterator<HeaderValue> for HeaderValues
Source§fn from_iter<I>(iter: I) -> HeaderValueswhere
    I: IntoIterator<Item = HeaderValue>,
 
fn from_iter<I>(iter: I) -> HeaderValueswhere
    I: IntoIterator<Item = HeaderValue>,
Creates a value from an iterator. Read more
Source§impl<I: SliceIndex<[HeaderValue]>> Index<I> for HeaderValues
 
impl<I: SliceIndex<[HeaderValue]>> Index<I> for HeaderValues
Source§impl<'a> IntoIterator for &'a HeaderValues
 
impl<'a> IntoIterator for &'a HeaderValues
Source§impl IntoIterator for HeaderValues
 
impl IntoIterator for HeaderValues
Source§impl<'a> PartialEq<&String> for HeaderValues
 
impl<'a> PartialEq<&String> for HeaderValues
Source§impl<'a> PartialEq<&'a str> for HeaderValues
 
impl<'a> PartialEq<&'a str> for HeaderValues
Source§impl<'a> PartialEq<[&'a str]> for HeaderValues
 
impl<'a> PartialEq<[&'a str]> for HeaderValues
Source§impl PartialEq<String> for HeaderValues
 
impl PartialEq<String> for HeaderValues
Source§impl PartialEq<str> for HeaderValues
 
impl PartialEq<str> for HeaderValues
Source§impl<'a> ToHeaderValues for &'a HeaderValues
 
impl<'a> ToHeaderValues for &'a HeaderValues
Auto Trait Implementations§
impl Freeze for HeaderValues
impl RefUnwindSafe for HeaderValues
impl Send for HeaderValues
impl Sync for HeaderValues
impl Unpin for HeaderValues
impl UnwindSafe for HeaderValues
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more