Trait cloudevents::binding::http::Headers
source · 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§
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
Implementations on Foreign Types§
source§impl<'a> Headers<'a> for HeaderMap
Available on crate feature actix only.
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>
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>
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§impl<'a> Headers<'a> for HeaderMap<HeaderValue>
impl<'a> Headers<'a> for HeaderMap<HeaderValue>
Implemention for the HeaderMap used by warp/reqwest