[][src]Module governor::state::direct

Direct rate limiters (those that can only hold one state).

Rate limiters based on these types are constructed with the RateLimiter constructors

Structs

InsufficientCapacity

An error that occurs when the number of cells required in check_n exceeds the maximum capacity of the limiter.

RatelimitedSink

A [Sink][futures::Sink] combinator that only allows sending elements when the rate-limiter allows it.

RatelimitedStream

A [Stream][futures::Stream] combinator which will limit the rate of items being received.

Enums

NotKeyed

The "this state store does not use keys" key type.

Traits

DirectStateStore

A trait for state stores that only keep one rate limiting state.

SinkRateLimitExt

Allows converting a [futures::Sink] combinator into a rate-limited sink.

StreamRateLimitExt

Allows converting a [futures::Stream] combinator into a rate-limited stream.