Trait sysinfo::NetworksExt [−][src]
Interacting with network interfaces.
Required methods
fn iter(&self) -> NetworksIter<'_>ⓘNotable traits for NetworksIter<'a>
impl<'a> Iterator for NetworksIter<'a> type Item = (&'a String, &'a NetworkData);
[src]
Notable traits for NetworksIter<'a>
impl<'a> Iterator for NetworksIter<'a> type Item = (&'a String, &'a NetworkData);
Returns an iterator over the network interfaces.
use sysinfo::{NetworkExt, NetworksExt, System, SystemExt}; let s = System::new_all(); let networks = s.get_networks(); for (interface_name, network) in networks { println!("in: {} B", network.get_received()); }
fn refresh_networks_list(&mut self)
[src]
Refreshes the network interfaces list.
use sysinfo::{NetworksExt, System, SystemExt}; let mut s = System::new_all(); let networks = s.get_networks_mut(); networks.refresh_networks_list();
fn refresh(&mut self)
[src]
Refreshes the network interfaces’ content.
use sysinfo::{NetworksExt, System, SystemExt}; let mut s = System::new_all(); let networks = s.get_networks_mut(); networks.refresh();
Implementors
impl NetworksExt for Networks
[src]
fn iter(&self) -> NetworksIter<'_>ⓘNotable traits for NetworksIter<'a>
impl<'a> Iterator for NetworksIter<'a> type Item = (&'a String, &'a NetworkData);
[src]
Notable traits for NetworksIter<'a>
impl<'a> Iterator for NetworksIter<'a> type Item = (&'a String, &'a NetworkData);