pub struct DeviceStats {
pub rx_pkts: u64,
pub tx_pkts: u64,
pub rx_bytes: u64,
pub tx_bytes: u64,
}Expand description
Network device statistics.
Holds counters for sent and received packets and bytes. These values can be read from the hardware’s statistic registers.
Fields§
§rx_pkts: u64Number of received packets.
tx_pkts: u64Number of transmitted packets.
rx_bytes: u64Number of received bytes.
tx_bytes: u64Number of transmitted bytes.
Trait Implementations§
Source§impl Clone for DeviceStats
impl Clone for DeviceStats
Source§fn clone(&self) -> DeviceStats
fn clone(&self) -> DeviceStats
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 Default for DeviceStats
impl Default for DeviceStats
Source§fn default() -> DeviceStats
fn default() -> DeviceStats
Returns the “default value” for a type. Read more
Source§impl Display for DeviceStats
impl Display for DeviceStats
impl Copy for DeviceStats
Auto Trait Implementations§
impl Freeze for DeviceStats
impl RefUnwindSafe for DeviceStats
impl Send for DeviceStats
impl Sync for DeviceStats
impl Unpin for DeviceStats
impl UnsafeUnpin for DeviceStats
impl UnwindSafe for DeviceStats
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