pub trait HeaderKeyT {
// Required methods
fn as_str_ext(&self) -> &str;
fn to_header_name(self) -> HeaderName;
// Provided method
fn default_header_value(&self) -> Option<HeaderValue> { ... }
}Expand description
Trait helper for managing HTTP header keys.
Required Methods§
Sourcefn as_str_ext(&self) -> &str
fn as_str_ext(&self) -> &str
as_str_ext and most times should be &’static
Sourcefn to_header_name(self) -> HeaderName
fn to_header_name(self) -> HeaderName
Get the key name
Provided Methods§
Sourcefn default_header_value(&self) -> Option<HeaderValue>
fn default_header_value(&self) -> Option<HeaderValue>
Get default value of the key
Return None if no default one.