pub struct RateMeter { /* private fields */ }Expand description
A counter of events that reports their rate once per window.
Owned by the one task that sees the events, so it needs no lock. It reads the clock through tokio, so a test with paused time drives it.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RateMeter
impl RefUnwindSafe for RateMeter
impl Send for RateMeter
impl Sync for RateMeter
impl Unpin for RateMeter
impl UnsafeUnpin for RateMeter
impl UnwindSafe for RateMeter
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