Struct pnet_datalink::NetworkInterface [−][src]
Represents a network interface and its associated addresses.
Fields
name: String
The name 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
impl NetworkInterface
[src]
pub fn mac_address(&self) -> MacAddr
[src]
Retrieve the MAC address associated with the interface.
pub fn is_up(&self) -> bool
[src]
pub fn is_broadcast(&self) -> bool
[src]
pub fn is_loopback(&self) -> bool
[src]
Is the interface a loopback interface?
pub fn is_point_to_point(&self) -> bool
[src]
pub fn is_multicast(&self) -> bool
[src]
Trait Implementations
impl Clone for NetworkInterface
[src]
fn clone(&self) -> NetworkInterface
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for NetworkInterface
[src]
impl Display for NetworkInterface
[src]
impl Eq for NetworkInterface
[src]
impl Hash for NetworkInterface
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<NetworkInterface> for NetworkInterface
[src]
fn eq(&self, other: &NetworkInterface) -> bool
[src]
fn ne(&self, other: &NetworkInterface) -> bool
[src]
impl StructuralEq for NetworkInterface
[src]
impl StructuralPartialEq for NetworkInterface
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,