pub struct MacAddr(/* private fields */);Expand description
Represents a physical hardware address (MAC address).
Implementations§
Source§impl MacAddr
impl MacAddr
Sourcepub const fn to_colon_seperated_array(&self) -> [u8; 17]
pub const fn to_colon_seperated_array(&self) -> [u8; 17]
Returns an array contains a colon formatted address.
The returned array can be used to directly convert to str
by using core::str::from_utf8(&array).unwrap( ).
Sourcepub const fn to_hyphen_seperated_array(&self) -> [u8; 17]
pub const fn to_hyphen_seperated_array(&self) -> [u8; 17]
Returns an array contains a hyphen formatted address.
The returned array can be used to directly convert to str
by using core::str::from_utf8(&array).unwrap( ).
Sourcepub const fn to_dot_seperated_array(&self) -> [u8; 14]
pub const fn to_dot_seperated_array(&self) -> [u8; 14]
Returns an array contains a dot formatted address.
The returned array can be used to directly convert to str
by using core::str::from_utf8(&array).unwrap( ).
Trait Implementations§
Source§impl<'a> Deserialize<'a> for MacAddr
impl<'a> Deserialize<'a> for MacAddr
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
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