Skip to main content

HeaderExtractor

Trait HeaderExtractor 

Source
pub trait HeaderExtractor: Sized {
    // Required method
    fn header(self, name: String) -> Header<Self>;
}
Expand description

Extension trait for adding header extraction to an extractor chain.

§For Callers

Chain this to extract HTTP header values as cache key parts. The header name becomes the key part name, and the header value becomes the key part value.

§For Implementors

This trait is automatically implemented for all Extractor types. You don’t need to implement it manually.

Required Methods§

Source

fn header(self, name: String) -> Header<Self>

Adds extraction for a single header by exact name.

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.

Implementors§

Source§

impl<E> HeaderExtractor for E
where E: Extractor,