pub struct MacAddr(pub u8, pub u8, pub u8, pub u8, pub u8, pub u8);
Expand description
A MAC address.
Tuple Fields§
§0: u8
§1: u8
§2: u8
§3: u8
§4: u8
§5: u8
Implementations§
source§impl MacAddr
impl MacAddr
sourcepub fn new(a: u8, b: u8, c: u8, d: u8, e: u8, f: u8) -> MacAddr
pub fn new(a: u8, b: u8, c: u8, d: u8, e: u8, f: u8) -> MacAddr
Construct a new MacAddr
instance.
sourcepub fn is_universal(&self) -> bool
pub fn is_universal(&self) -> bool
Returns true if the MacAddr is a universally administered addresses (UAA).
sourcepub fn is_local(&self) -> bool
pub fn is_local(&self) -> bool
Returns true if the MacAddr is a locally administered addresses (LAA).
sourcepub fn is_unicast(&self) -> bool
pub fn is_unicast(&self) -> bool
Returns true if the MacAddr is a unicast address.
sourcepub fn is_multicast(&self) -> bool
pub fn is_multicast(&self) -> bool
Returns true if the MacAddr is a multicast address.
sourcepub fn is_broadcast(&self) -> bool
pub fn is_broadcast(&self) -> bool
Returns true if the MacAddr is a broadcast address.
Trait Implementations§
source§impl Ord for MacAddr
impl Ord for MacAddr
source§impl PartialEq<[u8; 6]> for MacAddr
impl PartialEq<[u8; 6]> for MacAddr
source§impl PartialEq<MacAddr> for MacAddr
impl PartialEq<MacAddr> for MacAddr
source§impl PartialOrd<MacAddr> for MacAddr
impl PartialOrd<MacAddr> for MacAddr
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl PrimitiveValues for MacAddr
impl PrimitiveValues for MacAddr
impl Copy for MacAddr
impl Eq for MacAddr
impl StructuralEq for MacAddr
impl StructuralPartialEq for MacAddr
Auto Trait Implementations§
impl RefUnwindSafe for MacAddr
impl Send for MacAddr
impl Sync for MacAddr
impl Unpin 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