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§

Implementations on Foreign Types§

source§

impl<V> TryIntoHeaderPair for (String, V)where V: TryIntoHeaderValue, V::Error: Into<InvalidHeaderValue>,

§

type Error = InvalidHeaderPart

source§

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

source§

impl<V> TryIntoHeaderPair for (&[u8], V)where V: TryIntoHeaderValue, V::Error: Into<InvalidHeaderValue>,

§

type Error = InvalidHeaderPart

source§

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

source§

impl<V> TryIntoHeaderPair for (HeaderName, V)where V: TryIntoHeaderValue, V::Error: Into<InvalidHeaderValue>,

§

type Error = InvalidHeaderPart

source§

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

source§

impl<V> TryIntoHeaderPair for (&str, V)where V: TryIntoHeaderValue, V::Error: Into<InvalidHeaderValue>,

§

type Error = InvalidHeaderPart

source§

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

source§

impl<V> TryIntoHeaderPair for (&HeaderName, V)where V: TryIntoHeaderValue, V::Error: Into<InvalidHeaderValue>,

§

type Error = InvalidHeaderPart

source§

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

Implementors§