Struct nix::net::if_::Interfaces [−][src]
pub struct Interfaces { /* fields omitted */ }
Expand description
A list of the network interfaces available on this system. Obtained from if_nameindex()
.
Implementations
pub 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;
Notable traits for InterfacesIter<'a>
impl<'a> Iterator for InterfacesIter<'a> type Item = &'a Interface;
Iterate over the interfaces in this list.
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.