Trait ToHeader

Source
pub trait ToHeader {
    // Required method
    fn to_header(value: Self) -> ParsingResult<String>;
}
Expand description

Trait for converting from a Rust type into a Header value.

Required Methods§

Source

fn to_header(value: Self) -> ParsingResult<String>

Turn the value into a String suitable for being used in a message header.

Returns None if the value cannot be stringified.

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 ToHeader for String

Source§

impl<'a> ToHeader for &'a str

Implementors§