pub struct QueueStats {
pub packets: u64,
pub bytes: u64,
pub dropped: u64,
pub errors: u64,
}Expand description
Statistics for a queue
Fields§
§packets: u64Total packets received/transmitted
bytes: u64Total bytes received/transmitted
dropped: u64Packets dropped
errors: u64Errors encountered
Implementations§
Source§impl QueueStats
impl QueueStats
pub fn new() -> Self
Sourcepub fn add_packet(&mut self, bytes: usize)
pub fn add_packet(&mut self, bytes: usize)
Add packet stats
Sourcepub fn add_dropped(&mut self)
pub fn add_dropped(&mut self)
Add dropped packet
Trait Implementations§
Source§impl Clone for QueueStats
impl Clone for QueueStats
Source§fn clone(&self) -> QueueStats
fn clone(&self) -> QueueStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueueStats
impl Debug for QueueStats
Source§impl Default for QueueStats
impl Default for QueueStats
Source§fn default() -> QueueStats
fn default() -> QueueStats
Returns the “default value” for a type. Read more
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