Skip to main content

MethodExtractor

Trait MethodExtractor 

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

Extension trait for adding method extraction to an extractor chain.

§For Callers

Chain this after Method::new() or any other extractor to add the HTTP method to your cache key. The method is added as a key part with name "method" and value like "GET" or "POST".

§For Implementors

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

Required Methods§

Source

fn method(self) -> Method<Self>

Adds HTTP method extraction to the 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> MethodExtractor for E
where E: Extractor,