pub struct Iface { /* private fields */ }Expand description
Representation of a host network interface.
Implementations§
Source§impl Iface
impl Iface
Sourcepub fn from_system(name: &str) -> Result<Self>
pub fn from_system(name: &str) -> Result<Self>
Resolve an interface from the operating system by its name.
Sourcepub fn from_ipv4(addr: Ipv4Addr) -> Result<Self>
pub fn from_ipv4(addr: Ipv4Addr) -> Result<Self>
Resolve an interface by its primary IPv4 address.
Sourcepub fn index(&self) -> u32
pub fn index(&self) -> u32
Interface index as reported by the kernel. The index is used by some socket options (e.g. multicast subscriptions).
Trait Implementations§
impl Eq for Iface
impl StructuralPartialEq for Iface
Auto Trait Implementations§
impl Freeze for Iface
impl RefUnwindSafe for Iface
impl Send for Iface
impl Sync for Iface
impl Unpin for Iface
impl UnwindSafe for Iface
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