#[repr(C)]pub struct mac_addr_t {
pub a: u8,
pub b: u8,
pub c: u8,
pub d: u8,
pub e: u8,
pub f: u8,
}Fields§
§a: u8§b: u8§c: u8§d: u8§e: u8§f: u8Implementations§
Source§impl mac_addr_t
impl mac_addr_t
pub fn new(a: u8, b: u8, c: u8, d: u8, e: u8, f: u8) -> mac_addr_t
pub fn new_broadcast() -> mac_addr_t
pub fn zero() -> mac_addr_t
pub fn from_array(addr: &[u8; 6]) -> mac_addr_t
pub fn from_slice(addr: &[u8]) -> mac_addr_t
pub fn is_zero(&self) -> bool
pub fn from_u64(addr: u64) -> mac_addr_t
pub fn to_u64(&self) -> u64
pub fn to_slice(&self) -> &[u8] ⓘ
pub fn is_broadcast(&self) -> bool
pub fn is_multicast(&self) -> bool
pub fn as_ptr(&self) -> *const u8
pub fn from_string(mac_str: &String) -> Option<Self>
pub fn to_string(&self) -> String
Trait Implementations§
Source§impl Clone for mac_addr_t
impl Clone for mac_addr_t
Source§fn clone(&self) -> mac_addr_t
fn clone(&self) -> mac_addr_t
Returns a duplicate 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 mac_addr_t
impl Debug for mac_addr_t
Source§impl Default for mac_addr_t
impl Default for mac_addr_t
Source§fn default() -> mac_addr_t
fn default() -> mac_addr_t
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for mac_addr_t
impl<'de> Deserialize<'de> for mac_addr_t
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for mac_addr_t
impl Display for mac_addr_t
Source§impl Hash for mac_addr_t
impl Hash for mac_addr_t
Source§impl PartialEq for mac_addr_t
impl PartialEq for mac_addr_t
Source§impl Serialize for mac_addr_t
impl Serialize for mac_addr_t
impl Copy for mac_addr_t
impl Eq for mac_addr_t
impl StructuralPartialEq for mac_addr_t
Auto Trait Implementations§
impl Freeze for mac_addr_t
impl RefUnwindSafe for mac_addr_t
impl Send for mac_addr_t
impl Sync for mac_addr_t
impl Unpin for mac_addr_t
impl UnwindSafe for mac_addr_t
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