Skip to main content

Header

Trait Header 

Source
pub trait Header
where Self: IntoHeaderValue,
{ // Required methods fn name() -> HeaderName; fn parse<T: HttpMessage>(msg: &T) -> Result<Self, ParseError>; }
Expand description

A trait for any object that will represent a header field and value.

Required Methods§

Source

fn name() -> HeaderName

Returns the name of the header field

Source

fn parse<T: HttpMessage>(msg: &T) -> Result<Self, ParseError>

Parse a header

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§