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.
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 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more