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
sourceimpl 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
sourceimpl AsMut<HeaderValue> for HeaderValues
impl AsMut<HeaderValue> for HeaderValues
sourcepub fn as_mut(&mut self) -> &mut HeaderValue
pub fn as_mut(&mut self) -> &mut HeaderValue
Performs the conversion.
sourceimpl AsRef<HeaderValue> for HeaderValues
impl AsRef<HeaderValue> for HeaderValues
sourcepub fn as_ref(&self) -> &HeaderValue
pub fn as_ref(&self) -> &HeaderValue
Performs the conversion.
sourceimpl Clone for HeaderValues
impl Clone for HeaderValues
sourcepub fn clone(&self) -> HeaderValues
pub fn clone(&self) -> HeaderValues
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HeaderValues
impl Debug for HeaderValues
sourceimpl Deref for HeaderValues
impl Deref for HeaderValues
type Target = HeaderValue
type Target = HeaderValue
The resulting type after dereferencing.
sourcepub fn deref(&self) -> &HeaderValue
pub fn deref(&self) -> &HeaderValue
Dereferences the value.
sourceimpl DerefMut for HeaderValues
impl DerefMut for HeaderValues
sourcepub fn deref_mut(&mut self) -> &mut HeaderValue
pub fn deref_mut(&mut self) -> &mut HeaderValue
Mutably dereferences the value.
sourceimpl Display for HeaderValues
impl Display for HeaderValues
sourceimpl From<HeaderValue> for HeaderValues
impl From<HeaderValue> for HeaderValues
sourcepub fn from(other: HeaderValue) -> HeaderValues
pub fn from(other: HeaderValue) -> HeaderValues
Performs the conversion.
sourceimpl From<HeaderValues> for HeaderValue
impl From<HeaderValues> for HeaderValue
sourcepub fn from(other: HeaderValues) -> HeaderValue
pub fn from(other: HeaderValues) -> HeaderValue
Performs the conversion.
sourceimpl From<Vec<HeaderValue, Global>> for HeaderValues
impl From<Vec<HeaderValue, Global>> for HeaderValues
sourcepub fn from(headers: Vec<HeaderValue, Global>) -> HeaderValues
pub fn from(headers: Vec<HeaderValue, Global>) -> HeaderValues
Performs the conversion.
sourceimpl FromIterator<HeaderValue> for HeaderValues
impl FromIterator<HeaderValue> for HeaderValues
sourcepub fn from_iter<I>(iter: I) -> HeaderValues where
I: IntoIterator<Item = HeaderValue>,
pub fn from_iter<I>(iter: I) -> HeaderValues where
I: IntoIterator<Item = HeaderValue>,
Creates a value from an iterator. Read more
sourceimpl<I> Index<I> for HeaderValues where
I: SliceIndex<[HeaderValue]>,
impl<I> Index<I> for HeaderValues where
I: SliceIndex<[HeaderValue]>,
type Output = <I as SliceIndex<[HeaderValue]>>::Output
type Output = <I as SliceIndex<[HeaderValue]>>::Output
The returned type after indexing.
sourceimpl<'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.
sourcepub fn into_iter(self) -> <&'a HeaderValues as IntoIterator>::IntoIter
pub fn into_iter(self) -> <&'a HeaderValues as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl 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?
sourcepub fn into_iter(self) -> <HeaderValues as IntoIterator>::IntoIter
pub fn into_iter(self) -> <HeaderValues as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<'a, '_> PartialEq<&'_ String> for HeaderValues
impl<'a, '_> PartialEq<&'_ String> for HeaderValues
sourceimpl<'a> PartialEq<&'a str> for HeaderValues
impl<'a> PartialEq<&'a str> for HeaderValues
sourceimpl PartialEq<String> for HeaderValues
impl PartialEq<String> for HeaderValues
sourceimpl PartialEq<str> for HeaderValues
impl PartialEq<str> for HeaderValues
sourceimpl<'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.
sourcepub fn to_header_values(
&self
) -> Result<<&'a HeaderValues as ToHeaderValues>::Iter, Error>
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
impl RefUnwindSafe for HeaderValues
impl Send for HeaderValues
impl Sync for HeaderValues
impl Unpin for HeaderValues
impl UnwindSafe for HeaderValues
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more