Struct governor::state::InMemoryState [−][src]
pub struct InMemoryState(_);
Expand description
An in-memory representation of a GCRA’s rate-limiting state.
Implemented using AtomicU64
operations, this state representation can be used to
construct rate limiting states for other in-memory states: e.g., this crate uses
InMemoryState
as the states it tracks in the keyed rate limiters it implements.
Internally, the number tracked here is the theoretical arrival time (a GCRA term) in number of nanoseconds since the rate limiter was created.
Trait Implementations
Returns the “default value” for a type. Read more
The InMemoryState is the canonical “direct” state store.