pub type KeyExtractor = Arc<dyn Fn(&HeaderMap, &Extensions) -> String + Send + Sync>;Available on crate feature
tower only.Expand description
Custom, non-IP key extractor for callers that key requests by something other than client IP (API key, tenant id, …). Receives the request’s headers and extensions; returns the rate-limit key.
Overrides client-IP identity entirely: forwarded headers are never consulted.
Aliased Type§
pub struct KeyExtractor { /* private fields */ }