Skip to main content

Crate quota

Crate quota 

Source
Expand description

Fast keyed quota limiting with optional discrete refill intervals.

QuotaPool is the main concurrent keyed limiter. Quota remains as a small direct token counter used by the legacy direct-quota API and tests.

Structs§

CurrentQuota
A snapshot of how much quota is available after a check or consume operation.
Quota
A small single-quota token counter.
QuotaPolicy
Capacity and refill configuration shared by direct and pooled quota APIs.
QuotaPool
A concurrent keyed quota pool.
QuotaTooLow
Error returned when a quota cannot satisfy a requested cost.
RefillRate
A refill rate normalized to tokens per nanosecond.

Type Aliases§

QuotaKey
The default owned key type for a keyed quota pool.
QuotaResult
Standard quota operation result.