pub struct MacAddr { /* private fields */ }Expand description
MAC address for ethernet NIC.
Implementations
sourceimpl MacAddr
impl MacAddr
sourcepub fn parse_str<S>(s: &S) -> Result<MacAddr, &str>where
S: AsRef<str> + ?Sized,
pub fn parse_str<S>(s: &S) -> Result<MacAddr, &str>where
S: AsRef<str> + ?Sized,
Parse a string into an MacAddr object. The error contains the str that failed to be parsed, for nicer error message generation.
sourcepub fn from_bytes_unchecked(src: &[u8]) -> MacAddr
pub fn from_bytes_unchecked(src: &[u8]) -> MacAddr
Create a MacAddr object from raw bytes unchecked.
Does not check whether src.len() == MAC_ADDR_LEN.
sourcepub fn from_bytes(src: &[u8]) -> Result<MacAddr, MacError>
pub fn from_bytes(src: &[u8]) -> Result<MacAddr, MacError>
Create a MacAddr object from raw bytes.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for MacAddr
impl<'de> Deserialize<'de> for MacAddr
sourcefn deserialize<D>(deserializer: D) -> Result<MacAddr, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<MacAddr, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for MacAddr
impl Eq for MacAddr
impl StructuralEq 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more