Struct pnet_datalink::NetworkInterface
source · [−]pub struct NetworkInterface {
pub name: String,
pub description: String,
pub index: u32,
pub mac: Option<MacAddr>,
pub ips: Vec<IpNetwork>,
pub flags: u32,
}
Expand description
Represents a network interface and its associated addresses.
Fields
name: String
The name of the interface.
description: String
A description of the interface.
index: u32
The interface index (operating system specific).
mac: Option<MacAddr>
A MAC address for the interface.
ips: Vec<IpNetwork>
IP addresses and netmasks for the interface.
flags: u32
Operating system specific flags for the interface.
Implementations
sourceimpl NetworkInterface
impl NetworkInterface
pub fn is_up(&self) -> bool
pub fn is_broadcast(&self) -> bool
sourcepub fn is_loopback(&self) -> bool
pub fn is_loopback(&self) -> bool
Is the interface a loopback interface?
pub fn is_point_to_point(&self) -> bool
pub fn is_multicast(&self) -> bool
pub fn is_running(&self) -> bool
Trait Implementations
sourceimpl Clone for NetworkInterface
impl Clone for NetworkInterface
sourcefn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NetworkInterface
impl Debug for NetworkInterface
sourceimpl<'de> Deserialize<'de> for NetworkInterface
impl<'de> Deserialize<'de> for NetworkInterface
sourcefn 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
sourceimpl Display for NetworkInterface
impl Display for NetworkInterface
sourceimpl Hash for NetworkInterface
impl Hash for NetworkInterface
sourceimpl PartialEq<NetworkInterface> for NetworkInterface
impl PartialEq<NetworkInterface> for NetworkInterface
sourcefn eq(&self, other: &NetworkInterface) -> bool
fn eq(&self, other: &NetworkInterface) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &NetworkInterface) -> bool
fn ne(&self, other: &NetworkInterface) -> bool
This method tests for !=
.
sourceimpl Serialize for NetworkInterface
impl Serialize for NetworkInterface
impl Eq for NetworkInterface
impl StructuralEq for NetworkInterface
impl StructuralPartialEq for NetworkInterface
Auto Trait Implementations
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnwindSafe for NetworkInterface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more