throttle-kit 2.1.1

Rate limiting for Rust — GCRA (Generic Cell Rate Algorithm) with pluggable
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Errors returned by the rate limiter.
#[derive(Debug, thiserror::Error)]
pub enum RateLimitError {
    /// The request was rejected — rate limit exceeded.
    #[error("rate limit exceeded")]
    RateLimited,

    /// Backend-specific error (e.g. Redis connection failure).
    #[error("rate limit backend error: {0}")]
    BackendError(String),
}