Trait HeaderEntry

Source
pub trait HeaderEntry<D = Prevalidated>: Sized
where D: HeaderEntryDiscriminant<Self>,
{ type HeaderName; type HeaderValue; // Required methods fn header_name(&self) -> &Self::HeaderName; fn header_pair(self) -> (Self::HeaderName, Self::HeaderValue); }
Expand description

Trait for identifying valid header entries.

Header entries are distinguished by their discrimimants, (See HeaderEntryDiscriminant).

Required Associated Types§

Required Methods§

Source

fn header_name(&self) -> &Self::HeaderName

Source

fn header_pair(self) -> (Self::HeaderName, Self::HeaderValue)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<N, V> HeaderEntry<Postvalidated<<V as TryInto<HeaderValue>>::Error>> for (N, V)

Source§

impl<N: IntoHeaderName> HeaderEntry for (N, HeaderValue)

Implementors§