Skip to main content

HeaderValueInput

Trait HeaderValueInput 

Source
pub trait HeaderValueInput {
    // Required method
    fn into_value(self) -> Bytes;
}
Expand description

Anything that can become a header value.

This exists so every existing insert(name, value) call site keeps compiling across &str, String, and Bytes alike. A plain impl Into<Bytes> bound would not: Bytes: From<&'static str> but not From<&'a str>, so every borrowed-&str call site would break.

Required Methods§

Source

fn into_value(self) -> Bytes

Convert into the stored representation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl HeaderValueInput for &String

Source§

impl HeaderValueInput for &[u8]

Source§

impl HeaderValueInput for &str

Source§

impl HeaderValueInput for Cow<'_, str>

Source§

impl HeaderValueInput for String

Source§

impl HeaderValueInput for Vec<u8>

Implementors§