#[non_exhaustive]pub enum HardwareAddress {
Ethernet([u8; 6]),
Ip,
Ieee802154([u8; 8]),
}Expand description
A hardware (link-layer) address, as reported by a driver.
This is #[non_exhaustive] so that address kinds can be added later without
breaking every driver.
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([u8; 6])
An Ethernet (MAC) address.
Ip
No address, for devices that send and receive bare IP packets.
Ieee802154([u8; 8])
An IEEE 802.15.4 extended (64-bit) address.
Implementations§
Trait Implementations§
Source§impl Clone for HardwareAddress
impl Clone for HardwareAddress
Source§fn clone(&self) -> HardwareAddress
fn clone(&self) -> HardwareAddress
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 HardwareAddress
Source§impl Debug for HardwareAddress
impl Debug for HardwareAddress
impl Eq for HardwareAddress
Source§impl PartialEq for HardwareAddress
impl PartialEq for HardwareAddress
impl StructuralPartialEq for HardwareAddress
Auto Trait Implementations§
impl Freeze for HardwareAddress
impl RefUnwindSafe for HardwareAddress
impl Send for HardwareAddress
impl Sync for HardwareAddress
impl Unpin for HardwareAddress
impl UnsafeUnpin for HardwareAddress
impl UnwindSafe for HardwareAddress
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