Struct http_types::headers::HeaderValues
source · pub struct HeaderValues { /* private fields */ }
Expand description
A list of HeaderValue
s.
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
§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, Global>> for HeaderValues
impl From<Vec<HeaderValue, Global>> 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
§type Output = <I as SliceIndex<[HeaderValue]>>::Output
type Output = <I as SliceIndex<[HeaderValue]>>::Output
The returned type after indexing.
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<&'a str> for HeaderValues
impl<'a> PartialEq<&'a str> 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 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 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