Skip to main content

wayle_sysinfo/types/
network.rs

1/// Network interface metrics.
2#[derive(Debug, Clone, PartialEq)]
3pub struct NetworkData {
4    /// Interface name (e.g., "eth0", "wlan0").
5    pub interface: String,
6
7    /// Bytes received since last poll.
8    pub rx_bytes: u64,
9
10    /// Bytes transmitted since last poll.
11    pub tx_bytes: u64,
12
13    /// Receive rate in bytes per second.
14    pub rx_bytes_per_sec: u64,
15
16    /// Transmit rate in bytes per second.
17    pub tx_bytes_per_sec: u64,
18}