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§
Source§impl Ord for MacAddr
impl Ord for MacAddr
Source§impl PartialOrd for MacAddr
impl PartialOrd for MacAddr
impl Copy for MacAddr
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)