Struct wiremock::http::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 HeaderValues)
pub fn append(&mut self, other: &mut HeaderValues)
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) -> HeaderValues
fn from(other: HeaderValue) -> HeaderValues
Converts to this type from the input type.
source§impl From<HeaderValues> for HeaderValue
impl From<HeaderValues> for HeaderValue
source§fn from(other: HeaderValues) -> HeaderValue
fn from(other: HeaderValues) -> HeaderValue
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, Global>) -> HeaderValues
fn from(headers: Vec<HeaderValue, Global>) -> HeaderValues
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> Index<I> for HeaderValueswhere
I: SliceIndex<[HeaderValue]>,
impl<I> Index<I> for HeaderValueswhere
I: SliceIndex<[HeaderValue]>,
§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
§type Item = &'a HeaderValue
type Item = &'a HeaderValue
The type of the elements being iterated over.
source§fn into_iter(self) -> <&'a HeaderValues as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a HeaderValues as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl IntoIterator for HeaderValues
impl IntoIterator for HeaderValues
§type Item = HeaderValue
type Item = HeaderValue
The type of the elements being iterated over.
§type IntoIter = IntoIter<HeaderValue, Global>
type IntoIter = IntoIter<HeaderValue, Global>
Which kind of iterator are we turning this into?
source§fn into_iter(self) -> <HeaderValues as IntoIterator>::IntoIter
fn into_iter(self) -> <HeaderValues as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
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
§type Iter = Cloned<Values<'a>>
type Iter = Cloned<Values<'a>>
Returned iterator over header values which this type may correspond to.
source§fn to_header_values(
&self
) -> Result<<&'a HeaderValues as ToHeaderValues>::Iter, Error>
fn to_header_values(
&self
) -> Result<<&'a HeaderValues as ToHeaderValues>::Iter, Error>
Converts this object to an iterator of resolved
HeaderValues
.