pub struct NetworkInterface {
pub name: String,
pub description: String,
pub cidr: String,
pub ipv4: Ipv4Addr,
pub ips: Vec<IpNetwork>,
pub mac: MacAddr,
pub flags: u32,
pub index: u32,
}Expand description
Represents a network interface on current host
Fields§
§name: StringThe name of the network interface i.e. “en0”
description: StringA description of the network interface
cidr: StringThe cidr block associated with interface
ipv4: Ipv4AddrThe assigned IPV4 address on the interface
ips: Vec<IpNetwork>The IpNetwork of the interface
mac: MacAddrThe MAC address of the interface
flags: u32Any defined flags on the interface
index: u32The index of the interface
Trait Implementations§
Source§impl From<&NetworkInterface> for NetworkInterface
impl From<&NetworkInterface> for NetworkInterface
Source§fn from(value: &NetworkInterface) -> Self
fn from(value: &NetworkInterface) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for NetworkInterface
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnwindSafe for NetworkInterface
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more