pub trait HeaderSource {
// Required method
fn header_values<'a>(
&'a self,
name: &'a str,
) -> impl Iterator<Item = &'a [u8]> + 'a;
}Expand description
Read access to request headers, so the core works without any HTTP library.
Implemented for [(&str, &str)] slices (names compared case-insensitively) and, with the
axum feature, for http::HeaderMap.
Required Methods§
Sourcefn header_values<'a>(
&'a self,
name: &'a str,
) -> impl Iterator<Item = &'a [u8]> + 'a
fn header_values<'a>( &'a self, name: &'a str, ) -> impl Iterator<Item = &'a [u8]> + 'a
All values of the header name (lowercase), in order.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl HeaderSource for HeaderMap
Available on crate feature axum only.
impl HeaderSource for HeaderMap
Available on crate feature
axum only.