#[non_exhaustive]pub enum InterfaceKind {
Ethernet,
Wireless,
Loopback,
PointToPoint,
Bridge,
Other(u32),
}Expand description
The kind of a network interface.
Platforms expose different classifications (Linux ARPHRD_*, Windows
IfType, BSD/macOS IFT_*); this enum carries the subset that maps
cleanly across all of them. It is #[non_exhaustive] so adding
platform-specific kinds later is not a breaking change — see
ARCHITECTURE.md’s note on model extensibility.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Ethernet
Ethernet and other IEEE 802 MAC-layer interfaces.
Wireless
Wi-Fi / 802.11 wireless.
Loopback
Loopback (lo / Loopback Pseudo-Interface).
PointToPoint
Point-to-point tunnels and virtual links without a broadcast domain.
Bridge
A bridge or other software switch aggregating member interfaces.
Other(u32)
Anything not yet classified — the raw OS-supplied type code, when available, is carried alongside for diagnostics.
Trait Implementations§
Source§impl Clone for InterfaceKind
impl Clone for InterfaceKind
Source§fn clone(&self) -> InterfaceKind
fn clone(&self) -> InterfaceKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InterfaceKind
Source§impl Debug for InterfaceKind
impl Debug for InterfaceKind
Source§impl Display for InterfaceKind
impl Display for InterfaceKind
impl Eq for InterfaceKind
Source§impl Hash for InterfaceKind
impl Hash for InterfaceKind
Source§impl PartialEq for InterfaceKind
impl PartialEq for InterfaceKind
impl StructuralPartialEq for InterfaceKind
Auto Trait Implementations§
impl Freeze for InterfaceKind
impl RefUnwindSafe for InterfaceKind
impl Send for InterfaceKind
impl Sync for InterfaceKind
impl Unpin for InterfaceKind
impl UnsafeUnpin for InterfaceKind
impl UnwindSafe for InterfaceKind
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