#[repr(transparent)]pub struct MacAddress(pub [u8; 32]);Expand description
UEFI Media Access Control (MAC) address.
UEFI supports multiple network protocols and hardware types, not just Ethernet. Some of them may use MAC addresses longer than 6 bytes. To be protocol-agnostic and future-proof, the UEFI spec chooses a maximum size that can hold any supported media access control address.
In most cases, this is just a typical [u8; 6] Ethernet style MAC
address with the rest of the bytes being zero.
§Conversions and Relation to [core::net]
There is no matching type in [core::net] but the following [From]
implementations exist:
[u8; 6]<->MacAddress[u8; 32]->MacAddress
Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl MacAddress
impl MacAddress
Sourcepub fn into_ethernet_addr(self) -> [u8; 6]
pub fn into_ethernet_addr(self) -> [u8; 6]
Interpret the MAC address as normal 6-byte MAC address, as used in Ethernet.
Trait Implementations§
Source§impl Clone for MacAddress
impl Clone for MacAddress
Source§fn clone(&self) -> MacAddress
fn clone(&self) -> MacAddress
Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MacAddress
Source§impl Debug for MacAddress
impl Debug for MacAddress
Source§impl Default for MacAddress
impl Default for MacAddress
Source§fn default() -> MacAddress
fn default() -> MacAddress
Returns the “default value” for a type. Read more
impl Eq for MacAddress
Source§impl From<MacAddress> for [u8; 6]
impl From<MacAddress> for [u8; 6]
Source§fn from(MacAddress: MacAddress) -> Self
fn from(MacAddress: MacAddress) -> Self
Converts to this type from the input type.
Source§impl From<[u8; 6]> for MacAddress
impl From<[u8; 6]> for MacAddress
Source§impl From<[u8; 32]> for MacAddress
impl From<[u8; 32]> for MacAddress
Source§impl Hash for MacAddress
impl Hash for MacAddress
Source§impl Ord for MacAddress
impl Ord for MacAddress
Source§fn cmp(&self, other: &MacAddress) -> Ordering
fn cmp(&self, other: &MacAddress) -> Ordering
1.21.0 (const: unstable)§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 PartialEq for MacAddress
impl PartialEq for MacAddress
Source§impl PartialOrd for MacAddress
impl PartialOrd for MacAddress
impl StructuralPartialEq for MacAddress
Auto Trait Implementations§
impl Freeze for MacAddress
impl RefUnwindSafe for MacAddress
impl Send for MacAddress
impl Sync for MacAddress
impl Unpin for MacAddress
impl UnsafeUnpin for MacAddress
impl UnwindSafe for MacAddress
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)