pub trait Header: TryIntoHeaderValue {
// Required methods
fn name() -> HeaderName;
fn parse<M: HttpMessage>(msg: &M) -> Result<Self, ParseError>;
}
Expand description
An interface for types that already represent a valid header.
Required Methods§
sourcefn name() -> HeaderName
fn name() -> HeaderName
Returns the name of the header field.
sourcefn parse<M: HttpMessage>(msg: &M) -> Result<Self, ParseError>
fn parse<M: HttpMessage>(msg: &M) -> Result<Self, ParseError>
Parse the header from a HTTP message.
Object Safety§
This trait is not object safe.