[][src]Module ratelimit_meter::algorithms

Re-exports

pub use self::gcra::*;
pub use self::leaky_bucket::*;

Modules

gcra

The Generic Cell Rate Algorithm

leaky_bucket

A classic leaky bucket algorithm

Traits

Algorithm

The trait that implementations of metered rate-limiter algorithms have to implement.

KeyableRateLimitState

Trait implemented by all rate limit states that are compatible with the KeyedRateLimiters.

NonConformance

Provides additional information about non-conforming cells, most importantly the earliest time until the next cell could be considered conforming.

NonConformanceExt
RateLimitState

Trait that all rate limit states have to implement around housekeeping in keyed rate limiters.

RateLimitStateWithClock

Trait that all rate limit states implement if there is a real-time clock available.

Type Definitions

DefaultAlgorithm

The default rate limiting algorithm in this crate: The "leaky bucket".