Skip to main content

DashMapStateStore

Type Alias DashMapStateStore 

Source
pub type DashMapStateStore<K> = DashMap<K, InMemoryState>;
Expand description

A concurrent, thread-safe and fairly performant hashmap based on [DashMap].

Aliased Type§

pub struct DashMapStateStore<K> { /* private fields */ }

Trait Implementations§

Source§

impl<K: Hash + Eq + Clone> StateStore for DashMapStateStore<K>

Source§

type Key = K

The type of key that the state store can represent.
Source§

fn measure_and_replace<T, F, E>(&self, key: &Self::Key, f: F) -> Result<T, E>
where F: Fn(Option<Nanos>) -> Result<(T, Nanos), E>,

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