Skip to main content

PathExtractor

Trait PathExtractor 

Source
pub trait PathExtractor: Sized {
    // Required method
    fn path(self, resource: &str) -> Path<Self>;
}
Expand description

Extension trait for adding path extraction to an extractor chain.

§For Callers

Chain this to extract named segments from the request path. Each captured segment becomes a cache key part. Use patterns like /users/{user_id} to capture dynamic path segments.

§For Implementors

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

Required Methods§

Source

fn path(self, resource: &str) -> Path<Self>

Adds path parameter extraction with the given pattern.

See Path for pattern syntax documentation.

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