Struct hyper::ext::HeaderCaseMap
source · pub(crate) struct HeaderCaseMap(HeaderMap<Bytes>);
Expand description
A map from header names to their original casing as received in an HTTP message.
If an HTTP/1 response res
is parsed on a connection whose option
http1_preserve_header_case
was set to true and the response included
the following headers:
ⓘ
x-Bread: Baguette
X-BREAD: Pain
x-bread: Ficelle
Then res.extensions().get::<HeaderCaseMap>()
will return a map with:
ⓘ
HeaderCaseMap({
"x-bread": ["x-Bread", "X-BREAD", "x-bread"],
})
Tuple Fields§
§0: HeaderMap<Bytes>
Implementations§
source§impl HeaderCaseMap
impl HeaderCaseMap
sourcepub(crate) fn get_all<'a>(
&'a self,
name: &HeaderName
) -> impl Iterator<Item = impl AsRef<[u8]> + 'a> + 'a
pub(crate) fn get_all<'a>( &'a self, name: &HeaderName ) -> impl Iterator<Item = impl AsRef<[u8]> + 'a> + 'a
Returns a view of all spellings associated with that header name, in the order they were found.
sourcepub(crate) fn get_all_internal<'a>(
&'a self,
name: &HeaderName
) -> ValueIter<'_, Bytes> ⓘ
pub(crate) fn get_all_internal<'a>( &'a self, name: &HeaderName ) -> ValueIter<'_, Bytes> ⓘ
Returns a view of all spellings associated with that header name, in the order they were found.
pub(crate) fn default() -> Self
pub(crate) fn append<N>(&mut self, name: N, orig: Bytes)where N: IntoHeaderName,
Trait Implementations§
source§impl Clone for HeaderCaseMap
impl Clone for HeaderCaseMap
source§fn clone(&self) -> HeaderCaseMap
fn clone(&self) -> HeaderCaseMap
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 moreAuto Trait Implementations§
impl RefUnwindSafe for HeaderCaseMap
impl Send for HeaderCaseMap
impl Sync for HeaderCaseMap
impl Unpin for HeaderCaseMap
impl UnwindSafe for HeaderCaseMap
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