Struct pnet_datalink::MacAddr
source · [−]Expand description
A MAC address.
Tuple Fields
0: u8
1: u8
2: u8
3: u8
4: u8
5: u8
Implementations
sourceimpl 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
sourceimpl FromStr for MacAddr
impl FromStr for MacAddr
type Err = ParseMacAddrErr
type Err = ParseMacAddrErr
The associated error which can be returned from parsing.
sourceimpl Ord for MacAddr
impl Ord for MacAddr
sourceimpl PartialOrd<MacAddr> for MacAddr
impl PartialOrd<MacAddr> for MacAddr
sourcefn partial_cmp(&self, other: &MacAddr) -> Option<Ordering>
fn partial_cmp(&self, other: &MacAddr) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more