pub struct InMemoryBackend { /* private fields */ }Available on crate feature
distributed-rate-limit only.Expand description
Trait Implementations§
Source§impl Debug for InMemoryBackend
impl Debug for InMemoryBackend
Source§impl Default for InMemoryBackend
impl Default for InMemoryBackend
Source§fn default() -> InMemoryBackend
fn default() -> InMemoryBackend
Returns the “default value” for a type. Read more
Source§impl RateLimitBackend for InMemoryBackend
impl RateLimitBackend for InMemoryBackend
Source§fn increment_and_get(
&self,
key: &str,
window_secs: u64,
) -> Result<u64, ServerError>
fn increment_and_get( &self, key: &str, window_secs: u64, ) -> Result<u64, ServerError>
Increments key and returns current hit count for the active window.
Auto Trait Implementations§
impl !Freeze for InMemoryBackend
impl RefUnwindSafe for InMemoryBackend
impl Send for InMemoryBackend
impl Sync for InMemoryBackend
impl Unpin for InMemoryBackend
impl UnsafeUnpin for InMemoryBackend
impl UnwindSafe for InMemoryBackend
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