pub struct QueueStats { /* private fields */ }Expand description
Live queue statistics collected inside the queue.
Implementations§
Source§impl QueueStats
impl QueueStats
Sourcepub fn record_push(&self, current_size: usize)
pub fn record_push(&self, current_size: usize)
Record a push operation and update the max size if needed.
Sourcepub fn record_pop(&self)
pub fn record_pop(&self)
Record a pop operation.
Sourcepub fn record_overflow(&self)
pub fn record_overflow(&self)
Record an overflow event.
Sourcepub fn record_underflow(&self)
pub fn record_underflow(&self)
Record an underflow event.
Sourcepub fn snapshot(&self) -> QueueStatsSnapshot
pub fn snapshot(&self) -> QueueStatsSnapshot
Take an atomic snapshot of the current statistics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for QueueStats
impl RefUnwindSafe for QueueStats
impl Send for QueueStats
impl Sync for QueueStats
impl Unpin for QueueStats
impl UnsafeUnpin for QueueStats
impl UnwindSafe for QueueStats
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