Trait HeaderKeyT

Source
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§

Source

fn as_str_ext(&self) -> &str

as_str_ext and most times should be &’static

Source

fn to_header_name(self) -> HeaderName

Get the key name

Provided Methods§

Source

fn default_header_value(&self) -> Option<HeaderValue>

Get default value of the key

Return None if no default one.

Implementations on Foreign Types§

Source§

impl HeaderKeyT for &'static str

Source§

impl HeaderKeyT for HeaderName

Implementors§