pub struct NetworkInfo {Show 15 fields
pub network_type: Option<NetworkType>,
pub status: Option<ConnectionStatus>,
pub is_connected: Option<bool>,
pub ssid: Option<String>,
pub signal_strength_dbm: Option<i32>,
pub signal_quality_pct: Option<f64>,
pub ip_address: Option<String>,
pub mac_address: Option<String>,
pub gateway: Option<String>,
pub dns_servers: Option<Vec<String>>,
pub link_speed_mbps: Option<f64>,
pub bytes_tx: Option<u64>,
pub bytes_rx: Option<u64>,
pub latency_ms: Option<f64>,
pub packet_loss_pct: Option<f64>,
}Expand description
Network connection information.
Fields§
§network_type: Option<NetworkType>Network type
status: Option<ConnectionStatus>Connection status
is_connected: Option<bool>Whether connected
ssid: Option<String>SSID (for WiFi)
signal_strength_dbm: Option<i32>Signal strength (dBm)
signal_quality_pct: Option<f64>Signal quality percentage (0-100)
ip_address: Option<String>IP address
mac_address: Option<String>MAC address
gateway: Option<String>Gateway address
dns_servers: Option<Vec<String>>DNS servers
link_speed_mbps: Option<f64>Link speed in Mbps
bytes_tx: Option<u64>Bytes transmitted
bytes_rx: Option<u64>Bytes received
latency_ms: Option<f64>Latency to gateway (ms)
packet_loss_pct: Option<f64>Packet loss percentage
Implementations§
Trait Implementations§
Source§impl Clone for NetworkInfo
impl Clone for NetworkInfo
Source§fn clone(&self) -> NetworkInfo
fn clone(&self) -> NetworkInfo
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 NetworkInfo
impl Debug for NetworkInfo
Source§impl Default for NetworkInfo
impl Default for NetworkInfo
Source§fn default() -> NetworkInfo
fn default() -> NetworkInfo
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NetworkInfo
impl<'de> Deserialize<'de> for NetworkInfo
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
Source§impl Serialize for NetworkInfo
impl Serialize for NetworkInfo
Auto Trait Implementations§
impl Freeze for NetworkInfo
impl RefUnwindSafe for NetworkInfo
impl Send for NetworkInfo
impl Sync for NetworkInfo
impl Unpin for NetworkInfo
impl UnwindSafe for NetworkInfo
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