Skip to main content

VersionExtractor

Trait VersionExtractor 

Source
pub trait VersionExtractor: Sized {
    // Required method
    fn version(self) -> Version<Self>;
}
Expand description

Extension trait for adding version extraction to an extractor chain.

§For Callers

Chain this to include the HTTP protocol version in your cache key. The version is added as a key part with name "version" and value like "HTTP/1.1" or "HTTP/2".

§For Implementors

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

Required Methods§

Source

fn version(self) -> Version<Self>

Adds HTTP version extraction to this extractor chain.

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> VersionExtractor for E
where E: Extractor,