Trait IntoHeaderValue

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

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

A trait for any object that can be Converted to a HeaderValue

Required Associated Types§

Source

type Error: Into<HttpError>

The type returned in the event of a conversion error.

Required Methods§

Source

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

Try to convert value to a Header value.

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 IntoHeaderValue for u64

Source§

impl IntoHeaderValue for usize

Source§

impl IntoHeaderValue for String

Source§

impl IntoHeaderValue for Vec<u8>

Source§

impl IntoHeaderValue for Bytes

Source§

impl IntoHeaderValue for Mime

Source§

impl<'a> IntoHeaderValue for &'a str

Source§

impl<'a> IntoHeaderValue for &'a [u8]

Implementors§

Source§

impl IntoHeaderValue for ContentRangeSpec

Source§

impl IntoHeaderValue for IfMatch

Source§

impl IntoHeaderValue for IfNoneMatch

Source§

impl IntoHeaderValue for IfRange

Source§

impl IntoHeaderValue for HeaderValue

Source§

impl IntoHeaderValue for Accept

Source§

impl IntoHeaderValue for AcceptCharset

Source§

impl IntoHeaderValue for AcceptLanguage

Source§

impl IntoHeaderValue for Allow

Source§

impl IntoHeaderValue for CacheControl

Source§

impl IntoHeaderValue for ContentDisposition

Source§

impl IntoHeaderValue for ContentLanguage

Source§

impl IntoHeaderValue for ContentRange

Source§

impl IntoHeaderValue for ContentType

Source§

impl IntoHeaderValue for Date

Source§

impl IntoHeaderValue for ETag

Source§

impl IntoHeaderValue for EntityTag

Source§

impl IntoHeaderValue for Expires

Source§

impl IntoHeaderValue for HttpDate

Source§

impl IntoHeaderValue for IfModifiedSince

Source§

impl IntoHeaderValue for IfUnmodifiedSince

Source§

impl IntoHeaderValue for LastModified