pub enum MacAddr {
V6(MacAddr6),
V8(MacAddr8),
}Expand description
A MAC address, either in EUI-48 or EUI-64 format.
Variants§
Implementations§
Source§impl MacAddr
impl MacAddr
Sourcepub fn is_v6(&self) -> bool
pub fn is_v6(&self) -> bool
Returns true if the address is MacAddr6 address.
§Example
let addr = MacAddr::from([0xAC, 0xDE, 0x48, 0x23, 0x45, 0x67]);
assert_eq!(addr.is_v6(), true);
assert_eq!(addr.is_v8(), false);Trait Implementations§
impl Copy for MacAddr
impl Eq for MacAddr
Source§impl Ord for MacAddr
impl Ord for MacAddr
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for MacAddr
impl PartialOrd 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