Struct default_net::mac::MacAddr
source · pub struct MacAddr(pub u8, pub u8, pub u8, pub u8, pub u8, pub u8);
Expand description
Structure of MAC address
Tuple Fields§
§0: u8
§1: u8
§2: u8
§3: u8
§4: u8
§5: u8
Implementations§
source§impl MacAddr
impl MacAddr
sourcepub fn new(a: u8, b: u8, c: u8, d: u8, e: u8, f: u8) -> MacAddr
pub fn new(a: u8, b: u8, c: u8, d: u8, e: u8, f: u8) -> MacAddr
Construct a new MacAddr
instance.
sourcepub fn from_octets(octets: [u8; 6]) -> MacAddr
pub fn from_octets(octets: [u8; 6]) -> MacAddr
Construct a new MacAddr instance from the given octets
sourcepub fn from_hex_format(hex_mac_addr: &str) -> MacAddr
pub fn from_hex_format(hex_mac_addr: &str) -> MacAddr
Construct a new MacAddr instance from a colon-separated string of hex format
Trait Implementations§
source§impl Ord for MacAddr
impl Ord for MacAddr
source§impl PartialEq for MacAddr
impl PartialEq for MacAddr
source§impl PartialOrd for MacAddr
impl PartialOrd for MacAddr
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 moreimpl Copy for MacAddr
impl Eq for MacAddr
impl StructuralPartialEq for MacAddr
Auto Trait Implementations§
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