Module rate_limit

Module rate_limit 

Source
Expand description

Rate-limiting middleware.

This module provides both adaptive and fixed-rate limiters and wraps them in RateLimitMiddleware, which can be applied globally or per domain.

Structs§

AdaptiveLimiter
Adaptive limiter that reacts to response outcomes.
RateLimitMiddleware
A middleware for rate limiting requests.
RateLimitMiddlewareBuilder
Builder for RateLimitMiddleware.
TokenBucketLimiter
Fixed-rate limiter backed by a token bucket.

Enums§

Scope
Scope at which the middleware applies rate limits.

Traits§

RateLimiter
Trait for asynchronous, stateful rate limiters.