Type Definition governor::state::keyed::HashMapStateStore[][src]

pub type HashMapStateStore<K> = Mutex<HashMap<K, InMemoryState>>;
Expand description

A thread-safe (but not very performant) implementation of a keyed rate limiter state store using HashMap.

The HashMapStateStore is the default state store in std when no other thread-safe features are enabled.

Trait Implementations

Remove those keys with state older than drop_below.

Shrinks the capacity of the state store, if possible. Read more

Returns the number of “live” keys stored in the state store. Read more

Returns true if self has no keys stored in it. Read more

The type of key that the state store can represent.

Updates a state store’s rate limiting state for a given key, using the given closure. Read more