pub trait ToHeader: Type {
// Required method
fn to_header(&self) -> Option<HeaderValue>;
}
Expand description
Represents a type that can converted to HTTP header.
Required Methods§
Sourcefn to_header(&self) -> Option<HeaderValue>
fn to_header(&self) -> Option<HeaderValue>
Convert this value to HeaderValue
.
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.