Struct mac_address::MacAddress
source · pub struct MacAddress { /* private fields */ }
Expand description
Contains the individual bytes of the MAC address.
Implementations§
source§impl MacAddress
impl MacAddress
sourcepub fn new(bytes: [u8; 6]) -> MacAddress
pub fn new(bytes: [u8; 6]) -> MacAddress
Creates a new MacAddress
struct from the given bytes.
Trait Implementations§
source§impl Clone for MacAddress
impl Clone for MacAddress
source§fn clone(&self) -> MacAddress
fn clone(&self) -> MacAddress
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§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
source§impl Display for MacAddress
impl Display for MacAddress
source§impl FromStr for MacAddress
impl FromStr 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 · 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 PartialEq for MacAddress
impl PartialEq for MacAddress
source§fn eq(&self, other: &MacAddress) -> bool
fn eq(&self, other: &MacAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for MacAddress
impl PartialOrd for MacAddress
source§fn partial_cmp(&self, other: &MacAddress) -> Option<Ordering>
fn partial_cmp(&self, other: &MacAddress) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl TryFrom<&str> for MacAddress
impl TryFrom<&str> for MacAddress
impl Copy for MacAddress
impl Eq 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 UnwindSafe for MacAddress
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