pub struct NetworkInterfaceSnapshot {
pub name: String,
pub bytes_rx: u64,
pub bytes_tx: u64,
pub packets_rx: u64,
pub packets_tx: u64,
pub errors_rx: u64,
pub errors_tx: u64,
pub mac_address: String,
pub is_up: bool,
}Expand description
Per-interface network snapshot.
Fields§
§name: String§bytes_rx: u64§bytes_tx: u64§packets_rx: u64§packets_tx: u64§errors_rx: u64§errors_tx: u64§mac_address: String§is_up: boolWhether this interface has seen any traffic (cumulative rx or tx > 0). Note: sysinfo 0.34 does not expose OS-level link state, so this is a traffic-based heuristic — not a true up/down indicator.
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for NetworkInterfaceSnapshot
impl<'__de, __Context> BorrowDecode<'__de, __Context> for NetworkInterfaceSnapshot
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for NetworkInterfaceSnapshot
impl Clone for NetworkInterfaceSnapshot
Source§fn clone(&self) -> NetworkInterfaceSnapshot
fn clone(&self) -> NetworkInterfaceSnapshot
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 NetworkInterfaceSnapshot
impl Debug for NetworkInterfaceSnapshot
Source§impl<__Context> Decode<__Context> for NetworkInterfaceSnapshot
impl<__Context> Decode<__Context> for NetworkInterfaceSnapshot
Source§impl<'de> Deserialize<'de> for NetworkInterfaceSnapshot
impl<'de> Deserialize<'de> for NetworkInterfaceSnapshot
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 Encode for NetworkInterfaceSnapshot
impl Encode for NetworkInterfaceSnapshot
Source§impl PartialEq for NetworkInterfaceSnapshot
impl PartialEq for NetworkInterfaceSnapshot
Source§impl Serialize for NetworkInterfaceSnapshot
impl Serialize for NetworkInterfaceSnapshot
impl StructuralPartialEq for NetworkInterfaceSnapshot
Auto Trait Implementations§
impl Freeze for NetworkInterfaceSnapshot
impl RefUnwindSafe for NetworkInterfaceSnapshot
impl Send for NetworkInterfaceSnapshot
impl Sync for NetworkInterfaceSnapshot
impl Unpin for NetworkInterfaceSnapshot
impl UnsafeUnpin for NetworkInterfaceSnapshot
impl UnwindSafe for NetworkInterfaceSnapshot
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