token-bucket 11.2.0

Zero-dependency, lock-free atomic GCRA, Fixed-Window, Token-Bucket, and 64-way sharded bounded keyed rate-limiting engine.
Documentation
/// Error message for arithmetic overflow during configuration calculation.
pub(crate) const ERR_OVERFLOW: &str = "rate limiter configuration arithmetic overflow";

/// Error message for a zero rate or emission count.
pub(crate) const ERR_ZERO_RATE: &str = "rate must be greater than zero";

/// Error message for a zero burst capacity.
pub(crate) const ERR_ZERO_BURST: &str = "burst capacity must be greater than zero";

/// Error message for a zero period or interval duration.
pub(crate) const ERR_ZERO_PERIOD: &str = "period or interval must be greater than zero";

/// Error message for an out-of-range fixed-window or token-bucket limit.
pub(crate) const ERR_INVALID_LIMIT: &str = "limit must be between 1 and u32::MAX";

/// Error message for an invalid maximum keyed entry capacity.
pub(crate) const ERR_ZERO_CAPACITY: &str = "capacity must be greater than zero";

/// Error message for an out-of-range token-bucket capacity.
pub(crate) const ERR_INVALID_CAPACITY: &str =
    "token bucket capacity must be between 1 and u32::MAX";