pub struct RollingCounter { /* private fields */ }Expand description
A counter that tracks events in a fixed time window using a ring buffer.
rate() returns events per second observed within the window.
Implementations§
Source§impl RollingCounter
impl RollingCounter
Auto Trait Implementations§
impl Freeze for RollingCounter
impl RefUnwindSafe for RollingCounter
impl Send for RollingCounter
impl Sync for RollingCounter
impl Unpin for RollingCounter
impl UnsafeUnpin for RollingCounter
impl UnwindSafe for RollingCounter
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