governor::state::keyed

Trait KeyedStateStore

Source
pub trait KeyedStateStore<K: Hash>: StateStore<Key = K> { }
Expand description

A trait for state stores with one rate limiting state per key.

This is blanket-implemented by all StateStores with hashable (Eq + Hash + Clone) key associated types.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, K> KeyedStateStore<K> for T
where T: StateStore<Key = K>, K: Eq + Clone + Hash,