pub trait HeaderMapExt: Sealed {
    // Required methods
    fn typed_insert<H>(&mut self, header: H)
       where H: Header;
    fn typed_get<H>(&self) -> Option<H>
       where H: Header;
    fn typed_try_get<H>(&self) -> Result<Option<H>, Error>
       where H: Header;
}
Expand description

An extension trait adding “typed” methods to http::HeaderMap.

Required Methods§

source

fn typed_insert<H>(&mut self, header: H)where H: Header,

Inserts the typed Header into this HeaderMap.

source

fn typed_get<H>(&self) -> Option<H>where H: Header,

Tries to find the header by name, and then decode it into H.

source

fn typed_try_get<H>(&self) -> Result<Option<H>, Error>where H: Header,

Tries to find the header by name, and then decode it into H.

Implementations on Foreign Types§

source§

impl HeaderMapExt for HeaderMap

source§

fn typed_insert<H>(&mut self, header: H)where H: Header,

source§

fn typed_get<H>(&self) -> Option<H>where H: Header,

source§

fn typed_try_get<H>(&self) -> Result<Option<H>, Error>where H: Header,

Implementors§