pub struct NetworkStats {
pub name: String,
pub rx_bytes_per_sec: f64,
pub tx_bytes_per_sec: f64,
pub rx_total_bytes: u64,
pub tx_total_bytes: u64,
pub link_speed_mbps: Option<u32>,
pub link_up: Option<bool>,
pub wireless: Option<WirelessLink>,
}Expand description
Traffic of one network interface.
Fields§
§name: StringInterface name (e.g. "enp9s0").
rx_bytes_per_sec: f64Receive throughput.
tx_bytes_per_sec: f64Transmit throughput.
rx_total_bytes: u64Bytes received since the interface came up.
tx_total_bytes: u64Bytes transmitted since the interface came up.
link_speed_mbps: Option<u32>Negotiated link speed in Mbit/s (wired links), if known.
link_up: Option<bool>Whether the link is up, if the OS reports it.
wireless: Option<WirelessLink>Wi-Fi link details, for wireless interfaces.
Trait Implementations§
Source§impl Clone for NetworkStats
impl Clone for NetworkStats
Source§impl Debug for NetworkStats
impl Debug for NetworkStats
Source§impl Default for NetworkStats
impl Default for NetworkStats
Source§impl<'de> Deserialize<'de> for NetworkStatswhere
NetworkStats: Default,
impl<'de> Deserialize<'de> for NetworkStatswhere
NetworkStats: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NetworkStats
impl RefUnwindSafe for NetworkStats
impl Send for NetworkStats
impl Sync for NetworkStats
impl Unpin for NetworkStats
impl UnsafeUnpin for NetworkStats
impl UnwindSafe for NetworkStats
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