pub struct InterfaceAddr {
pub name: String,
pub address: Option<IpAddr>,
pub netmask: Option<IpAddr>,
pub ifu: InterfaceIfu,
pub flags: InterfaceFlags,
}
Expand description
Represents the configuration and state of a network interface. Interfaces are uniquely identified by name, and each interface is likely to be referred to multiple times, e.g. one for IPv4 and one for IPv6.
Fields§
§name: String
The name of the interface
address: Option<IpAddr>
The address assigned to the interface for this protocol.
A value of None
means the libc reported a type of IP address that
std::net
doesn’t understand.
netmask: Option<IpAddr>
The netmasks assigned to the interface for this protocol.
A value of None
means the libc reported a type of IP address that
std::net
doesn’t understand.
ifu: InterfaceIfu
The ifu assigned to the interface for this protocol.
A value of None
means the libc reported a type of IP address that
std::net
doesn’t understand.
flags: InterfaceFlags
Flags regarding the interface’s behaviour and state
Trait Implementations§
Source§impl Clone for InterfaceAddr
impl Clone for InterfaceAddr
Source§fn clone(&self) -> InterfaceAddr
fn clone(&self) -> InterfaceAddr
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for InterfaceAddr
impl RefUnwindSafe for InterfaceAddr
impl Send for InterfaceAddr
impl Sync for InterfaceAddr
impl Unpin for InterfaceAddr
impl UnwindSafe for InterfaceAddr
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