1 2 3 4 5 6 7 8 9 10 11 12
use super::*; /// Unified rate-limiting algorithm policy applied to every key in a `KeyedRateLimiter`. #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] pub enum RateLimitPolicy { /// Generic Cell Rate Algorithm (smooth leaky-bucket arrival scheduling). Gcra(GcraConfig), /// Lock-free packed fixed-window counter. FixedWindow(FixedWindowConfig), /// Lock-free packed token bucket with discrete or smooth refill steps. TokenBucket(TokenBucketConfig), }