Skip to main content

Module rate_limiter

Module rate_limiter 

Source

Structs§

LocalLimiter
A thread-safe limiter built on Atomics. It’s base unit is in seconds, i.e. the minimum allowed rate is 1 per second. Internally the limiter works with the system time granularity, i.e. nanoseconds on unix and milliseconds on windows. The implementation is a sliding window: every time the limiter is increased, the amount of time that has passed is also refilled.

Traits§

Limiter