Trait awc::http::header::TryIntoHeaderPair

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

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

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

§

type Error = InvalidHeaderPart

§

fn try_into_pair( self ) -> Result<(HeaderName, HeaderValue), <(&str, V) as TryIntoHeaderPair>::Error>

§

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

§

type Error = InvalidHeaderPart

§

fn try_into_pair( self ) -> Result<(HeaderName, HeaderValue), <(&HeaderName, V) as TryIntoHeaderPair>::Error>

§

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

§

type Error = InvalidHeaderPart

§

fn try_into_pair( self ) -> Result<(HeaderName, HeaderValue), <(&[u8], V) as TryIntoHeaderPair>::Error>

§

impl<V> TryIntoHeaderPair for (String, V)

§

type Error = InvalidHeaderPart

§

fn try_into_pair( self ) -> Result<(HeaderName, HeaderValue), <(String, V) as TryIntoHeaderPair>::Error>

§

impl<V> TryIntoHeaderPair for (HeaderName, V)

§

type Error = InvalidHeaderPart

§

fn try_into_pair( self ) -> Result<(HeaderName, HeaderValue), <(HeaderName, V) as TryIntoHeaderPair>::Error>

Implementors§

§

impl<T> TryIntoHeaderPair for T
where T: Header,