pub struct SlidingWindowBackend { /* private fields */ }Available on crate feature
sliding-window only.Expand description
In-memory backend using a sliding window algorithm.
Tracks request timestamps in a deque and counts requests within the current time window. Rejects requests when the count exceeds the quota’s burst limit.
Implementations§
Trait Implementations§
Source§impl Clone for SlidingWindowBackend
impl Clone for SlidingWindowBackend
Source§impl Default for SlidingWindowBackend
impl Default for SlidingWindowBackend
Auto Trait Implementations§
impl !RefUnwindSafe for SlidingWindowBackend
impl Freeze for SlidingWindowBackend
impl Send for SlidingWindowBackend
impl Sync for SlidingWindowBackend
impl Unpin for SlidingWindowBackend
impl UnsafeUnpin for SlidingWindowBackend
impl UnwindSafe for SlidingWindowBackend
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