Skip to main content

Module trypema

Module trypema 

Source
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§

hybridredis-tokio or redis-smol
Hybrid rate limiter implementations (local fast-path + periodic Redis sync).
local
In-process rate limiting provider.
redisredis-tokio or redis-smol
Redis-backed distributed rate limiter implementations.

Structs§

HardLimitFactor
Hard cutoff multiplier for the suppressed strategy.
RateGroupSizeMs
Bucket coalescing interval in milliseconds.
RateLimit
Per-second rate limit for a key.
RateLimiter
Primary rate limiter facade.
RateLimiterBuilder
Builder for RateLimiter.
RateLimiterOptions
Configuration for RateLimiter.
SuppressionFactorCacheMs
Cache duration (milliseconds) for suppression factor recomputation.
WindowSizeSeconds
Sliding window size in seconds.

Enums§

RateLimitDecision
Result of a rate limit admission check.
TrypemaError
All errors that can occur when using the Trypema rate limiter.