Struct network_interface::NetworkInterface
source · pub struct NetworkInterface {
pub name: String,
pub addr: Vec<Addr>,
pub mac_addr: Option<String>,
pub index: u32,
}
Expand description
A system’s network interface
Fields§
§name: String
Interface’s name
addr: Vec<Addr>
Interface’s address
mac_addr: Option<String>
MAC Address
index: u32
Interface’s index
Implementations§
source§impl NetworkInterface
impl NetworkInterface
pub fn new_afinet( name: &str, addr: Ipv4Addr, netmask: Netmask<Ipv4Addr>, broadcast: Option<Ipv4Addr>, index: u32 ) -> NetworkInterface
pub fn new_afinet6( name: &str, addr: Ipv6Addr, netmask: Netmask<Ipv6Addr>, broadcast: Option<Ipv6Addr>, index: u32 ) -> NetworkInterface
pub fn with_mac_addr(self, mac_addr: Option<String>) -> Self
Trait Implementations§
source§impl Clone for NetworkInterface
impl Clone for NetworkInterface
source§fn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
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 moresource§impl Debug for NetworkInterface
impl Debug for NetworkInterface
source§impl Hash for NetworkInterface
impl Hash for NetworkInterface
source§impl PartialEq for NetworkInterface
impl PartialEq for NetworkInterface
source§fn 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 ==
.impl Eq for NetworkInterface
impl StructuralPartialEq for NetworkInterface
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