pub trait Key:
Eq
+ Hash
+ Send
+ Sync {
type Extractor;
// Required method
fn from_extractor(extractor: &Self::Extractor) -> Self;
}Expand description
Trait defining the requirements for a key extractor, which is used to uniquely identify limit subjects and extract rate limit parameters dynamically in request processing.
Required Associated Types§
Required Methods§
Sourcefn from_extractor(extractor: &Self::Extractor) -> Self
fn from_extractor(extractor: &Self::Extractor) -> Self
Creates an instance of Self from the provided extractor reference, allowing extraction of key data.
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.