pub struct MemoryRateLimitStore { /* private fields */ }Expand description
The default: one map, this process, no dependencies.
Right for development, for a single node, and for anything limited for
politeness rather than for safety. Wrong for a credential limiter on more
than one replica — see is_shared.
Implementations§
Trait Implementations§
Source§impl Debug for MemoryRateLimitStore
impl Debug for MemoryRateLimitStore
Source§impl Default for MemoryRateLimitStore
impl Default for MemoryRateLimitStore
Source§impl RateLimitStore for MemoryRateLimitStore
impl RateLimitStore for MemoryRateLimitStore
Source§fn peek<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Result<Option<Hit>>>
fn peek<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Result<Option<Hit>>>
The state of
key without recording anything. Read moreSource§fn clear<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Result<()>>
fn clear<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Result<()>>
Forget
key, restoring its full allowance. Read moreWhether other instances of this application see the same counters. Read more
Auto Trait Implementations§
impl !Freeze for MemoryRateLimitStore
impl RefUnwindSafe for MemoryRateLimitStore
impl Send for MemoryRateLimitStore
impl Sync for MemoryRateLimitStore
impl Unpin for MemoryRateLimitStore
impl UnsafeUnpin for MemoryRateLimitStore
impl UnwindSafe for MemoryRateLimitStore
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