Available on crate feature
trypema only.Expand description
Rate limiting via the trypema crate.
This module re-exports all public types from trypema, providing
sliding-window rate limiting with local, Redis-backed, and hybrid
providers. Enable the trypema feature to use this module.
Modules§
- hybrid
redis-tokioorredis-smol - Hybrid rate limiter implementations (local fast-path + periodic Redis sync).
- local
- In-process rate limiting provider.
- redis
redis-tokioorredis-smol - Redis-backed distributed rate limiter implementations.
Structs§
- Hard
Limit Factor - Hard cutoff multiplier for the suppressed strategy.
- Rate
Group Size Ms - Bucket coalescing interval in milliseconds.
- Rate
Limit - Per-second rate limit for a key.
- Rate
Limiter - Primary rate limiter facade.
- Rate
Limiter Builder - Builder for
RateLimiter. - Rate
Limiter Options - Configuration for
RateLimiter. - Suppression
Factor Cache Ms - Cache duration (milliseconds) for suppression factor recomputation.
- Window
Size Seconds - Sliding window size in seconds.
Enums§
- Rate
Limit Decision - Result of a rate limit admission check.
- Trypema
Error - All errors that can occur when using the Trypema rate limiter.