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§
Sourcefn to_header(value: Self) -> ParsingResult<String>
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.