Trait HeaderMapExt
pub trait HeaderMapExt: Sealed {
// Required methods
fn typed_insert<H>(&mut self, header: H)
where H: HeaderEncode;
fn typed_get<H>(&self) -> Option<H>
where H: HeaderDecode;
fn typed_try_get<H>(&self) -> Result<Option<H>, Error>
where H: HeaderDecode;
}Expand description
An extension trait adding “typed” methods to http::HeaderMap.
Required Methods§
fn typed_insert<H>(&mut self, header: H)where
H: HeaderEncode,
fn typed_insert<H>(&mut self, header: H)where
H: HeaderEncode,
Inserts the typed header into this HeaderMap.
fn typed_get<H>(&self) -> Option<H>where
H: HeaderDecode,
fn typed_get<H>(&self) -> Option<H>where
H: HeaderDecode,
Tries to find the header by name, and then decode it into H.
fn typed_try_get<H>(&self) -> Result<Option<H>, Error>where
H: HeaderDecode,
fn typed_try_get<H>(&self) -> Result<Option<H>, Error>where
H: HeaderDecode,
Tries to find the header by name, and then decode it into H.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.