Trait http_types_rs::headers::Header
source · pub trait Header {
// Required methods
fn header_name(&self) -> HeaderName;
fn header_value(&self) -> HeaderValue;
// Provided method
fn apply_header<H: AsMut<Headers>>(&self, headers: H) { ... }
}
Expand description
A trait representing a HeaderName
and HeaderValue
pair.
Required Methods§
sourcefn header_name(&self) -> HeaderName
fn header_name(&self) -> HeaderName
Access the header’s name.
sourcefn header_value(&self) -> HeaderValue
fn header_value(&self) -> HeaderValue
Access the header’s value.
Provided Methods§
sourcefn apply_header<H: AsMut<Headers>>(&self, headers: H)
fn apply_header<H: AsMut<Headers>>(&self, headers: H)
Insert the header name and header value into something that looks like a
Headers
map.
Object Safety§
This trait is not object safe.