pub struct Interfaces { /* private fields */ }
Expand description
A list of the network interfaces available on this system. Obtained from if_nameindex()
.
Implementations
sourceimpl Interfaces
impl Interfaces
sourcepub fn iter(&self) -> InterfacesIter<'_>ⓘNotable traits for InterfacesIter<'a>impl<'a> Iterator for InterfacesIter<'a> type Item = &'a Interface;
pub fn iter(&self) -> InterfacesIter<'_>ⓘNotable traits for InterfacesIter<'a>impl<'a> Iterator for InterfacesIter<'a> type Item = &'a Interface;
Iterate over the interfaces in this list.
sourcepub fn to_slice(&self) -> &[Interface]
pub fn to_slice(&self) -> &[Interface]
Convert this to a slice of interfaces. Note that the underlying interfaces list is
null-terminated, so calling this calculates the length. If random access isn’t needed,
Interfaces::iter()
should be used instead.
Trait Implementations
sourceimpl Debug for Interfaces
impl Debug for Interfaces
sourceimpl Drop for Interfaces
impl Drop for Interfaces
sourceimpl<'a> IntoIterator for &'a Interfaces
impl<'a> IntoIterator for &'a Interfaces
Auto Trait Implementations
impl RefUnwindSafe for Interfaces
impl !Send for Interfaces
impl !Sync for Interfaces
impl Unpin for Interfaces
impl UnwindSafe for Interfaces
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more