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".
Implementations on Foreign Types§
Source§impl ToHeader for Decimal
Available on crate feature rust_decimal only.
impl ToHeader for Decimal
Available on crate feature
rust_decimal only.fn to_header(&self) -> Option<HeaderValue>
Source§impl ToHeader for Duration
Available on crate feature humantime only.
impl ToHeader for Duration
Available on crate feature
humantime only.fn to_header(&self) -> Option<HeaderValue>
Source§impl ToHeader for Duration
Available on crate feature humantime only.
impl ToHeader for Duration
Available on crate feature
humantime only.fn to_header(&self) -> Option<HeaderValue>
Source§impl ToHeader for ObjectId
Available on crate feature bson only.
impl ToHeader for ObjectId
Available on crate feature
bson only.fn to_header(&self) -> Option<HeaderValue>
Source§impl ToHeader for Url
Available on crate feature url only.
impl ToHeader for Url
Available on crate feature
url only.fn to_header(&self) -> Option<HeaderValue>
Source§impl ToHeader for Uuid
Available on crate feature uuid only.
impl ToHeader for Uuid
Available on crate feature
uuid only.