Trait TryIntoHeaderPair

Source
pub trait TryIntoHeaderPair: Sized {
    type Error: Into<HttpError>;

    // Required method
    fn try_into_pair(self) -> Result<(HeaderName, HeaderValue), Self::Error>;
}
Expand description

An interface for types that can be converted into a HeaderName + HeaderValue pair for insertion into a HeaderMap.

Required Associated Types§

Required Methods§

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<V> TryIntoHeaderPair for (&str, V)

Source§

type Error = InvalidHeaderPart

Source§

fn try_into_pair(self) -> Result<(HeaderName, HeaderValue), Self::Error>

Source§

impl<V> TryIntoHeaderPair for (&HeaderName, V)

Source§

type Error = InvalidHeaderPart

Source§

fn try_into_pair(self) -> Result<(HeaderName, HeaderValue), Self::Error>

Source§

impl<V> TryIntoHeaderPair for (&[u8], V)

Source§

type Error = InvalidHeaderPart

Source§

fn try_into_pair(self) -> Result<(HeaderName, HeaderValue), Self::Error>

Source§

impl<V> TryIntoHeaderPair for (String, V)

Source§

type Error = InvalidHeaderPart

Source§

fn try_into_pair(self) -> Result<(HeaderName, HeaderValue), Self::Error>

Source§

impl<V> TryIntoHeaderPair for (HeaderName, V)

Source§

type Error = InvalidHeaderPart

Source§

fn try_into_pair(self) -> Result<(HeaderName, HeaderValue), Self::Error>

Implementors§