pub struct MacAddr(pub [u8; 6]);Expand description
A 48-bit MAC address. Serialized as the canonical lowercase colon-hex string.
Tuple Fields§
§0: [u8; 6]Implementations§
Source§impl MacAddr
impl MacAddr
Sourcepub fn is_unicast(&self) -> bool
pub fn is_unicast(&self) -> bool
True when the unicast bit (LSB of the first octet) is clear.
Sourcepub fn is_locally_administered(&self) -> bool
pub fn is_locally_administered(&self) -> bool
True when the locally-administered bit (second-LSB of the first octet) is set: a self-assigned address that cannot collide with a vendor OUI.
Trait Implementations§
impl Copy for MacAddr
Source§impl<'de> Deserialize<'de> for MacAddr
impl<'de> Deserialize<'de> for MacAddr
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for MacAddr
impl StructuralPartialEq for MacAddr
Auto Trait Implementations§
impl Freeze for MacAddr
impl RefUnwindSafe for MacAddr
impl Send for MacAddr
impl Sync for MacAddr
impl Unpin for MacAddr
impl UnsafeUnpin for MacAddr
impl UnwindSafe for MacAddr
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