pub struct InMemoryFixedWindowStore { /* private fields */ }Expand description
In-memory FixedWindowStore backed by a concurrent hash map.
This is the default store used by FixedWindowRateLimiter.
It holds per-key counters in a DashMap and performs lazy eviction.
Implementations§
Trait Implementations§
Source§impl Clone for InMemoryFixedWindowStore
impl Clone for InMemoryFixedWindowStore
Source§fn clone(&self) -> InMemoryFixedWindowStore
fn clone(&self) -> InMemoryFixedWindowStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InMemoryFixedWindowStore
impl Debug for InMemoryFixedWindowStore
Source§impl Default for InMemoryFixedWindowStore
impl Default for InMemoryFixedWindowStore
Source§impl FixedWindowStore for InMemoryFixedWindowStore
impl FixedWindowStore for InMemoryFixedWindowStore
Source§fn check_and_count(&self, params: FixedWindowParams) -> bool
fn check_and_count(&self, params: FixedWindowParams) -> bool
Atomically checks and increments the counter for the given window.
Auto Trait Implementations§
impl Freeze for InMemoryFixedWindowStore
impl !RefUnwindSafe for InMemoryFixedWindowStore
impl Send for InMemoryFixedWindowStore
impl Sync for InMemoryFixedWindowStore
impl Unpin for InMemoryFixedWindowStore
impl UnsafeUnpin for InMemoryFixedWindowStore
impl !UnwindSafe for InMemoryFixedWindowStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more