Trait headers_core::Header[][src]

pub trait Header {
    const NAME: &'static HeaderName;

    fn decode(values: &mut Values) -> Option<Self>
    where
        Self: Sized
;
fn encode(&self, values: &mut ToValues); }

A trait for any object that will represent a header field and value.

This trait represents the construction and identification of headers, and contains trait-object unsafe methods.

Associated Constants

The name of this header.

Required Methods

Decode this type from a HeaderValue.

Encode this type to a HeaderMap.

This function should be infallible. Any errors converting to a HeaderValue should have been caught when parsing or constructing this value.

Implementors