Skip to main content

TryIntoHeaderValue

Trait TryIntoHeaderValue 

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

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

An interface for types that can be converted into 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_value(self) -> Result<HeaderValue, Self::Error>

Try to convert value to a HeaderValue.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TryIntoHeaderValue for &[u8]

Source§

impl TryIntoHeaderValue for &str

Source§

impl TryIntoHeaderValue for Bytes

Source§

impl TryIntoHeaderValue for Mime

Source§

impl TryIntoHeaderValue for String

Source§

impl TryIntoHeaderValue for Vec<u8>

Source§

impl TryIntoHeaderValue for i32

Source§

impl TryIntoHeaderValue for i64

Source§

impl TryIntoHeaderValue for u32

Source§

impl TryIntoHeaderValue for u64

Source§

impl TryIntoHeaderValue for usize

Implementors§