pub trait Headers<'a> {
    type Iterator: Iterator<Item = (&'a HeaderName, &'a HeaderValue)>;

    // Required methods
    fn get<K: AsHeaderName>(&self, name: K) -> Option<&HeaderValue>;
    fn iter(&'a self) -> Self::Iterator;
}
Available on crate features http-binding or actix or warp or reqwest or axum or poem only.
Expand description

Any http library should be able to use the to_event function with an implementation of this trait.

Required Associated Types§

Required Methods§

source

fn get<K: AsHeaderName>(&self, name: K) -> Option<&HeaderValue>

source

fn iter(&'a self) -> Self::Iterator

Implementations on Foreign Types§

source§

impl<'a> Headers<'a> for HeaderMap

Available on crate feature actix only.

Implement Headers for the actix HeaderMap

§

type Iterator = Box<dyn Iterator<Item = (&'a HeaderName, &'a HeaderValue)> + 'a, Global>

Available on crate features http-binding or actix or warp or reqwest or axum or poem only.
source§

fn get<K: AsHeaderName>(&self, key: K) -> Option<&HeaderValue>

Available on crate features http-binding or actix or warp or reqwest or axum or poem only.
source§

fn iter(&'a self) -> Self::Iterator

Available on crate features http-binding or actix or warp or reqwest or axum or poem only.
source§

impl<'a> Headers<'a> for HeaderMap<HeaderValue>

Implemention for the HeaderMap used by warp/reqwest

§

type Iterator = Iter<'a, HeaderValue>

source§

fn get<K: AsHeaderName>(&self, name: K) -> Option<&HeaderValue>

source§

fn iter(&'a self) -> Self::Iterator

Implementors§