Struct nix::net::if_::Interfaces
source · pub struct Interfaces { /* private fields */ }
Expand description
A list of the network interfaces available on this system. Obtained from if_nameindex()
.
Implementations§
source§impl Interfaces
impl Interfaces
sourcepub fn iter(&self) -> InterfacesIter<'_> ⓘ
pub fn iter(&self) -> InterfacesIter<'_> ⓘ
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.