pub struct MacAddress(/* private fields */);Implementations§
Methods from Deref<Target = MacAddr6>§
Sourcepub fn is_nil(&self) -> bool
pub fn is_nil(&self) -> bool
Returns true if the address is nil.
§Example
let addr = MacAddr6::new(0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
assert_eq!(addr.is_nil(), true);Sourcepub fn is_broadcast(&self) -> bool
pub fn is_broadcast(&self) -> bool
Returns true if the address is broadcast.
§Example
let addr = MacAddr6::new(0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF);
assert_eq!(addr.is_broadcast(), true);Sourcepub fn is_unicast(&self) -> bool
pub fn is_unicast(&self) -> bool
Returns true if the address is unicast.
§Example
let addr = MacAddr6::new(0x00, 0x01, 0x44, 0x55, 0x66, 0x77);
assert_eq!(addr.is_unicast(), true);Sourcepub fn is_multicast(&self) -> bool
pub fn is_multicast(&self) -> bool
Returns true if the address is multicast.
§Example
let addr = MacAddr6::new(0x01, 0x00, 0x0C, 0xCC, 0xCC, 0xCC);
assert_eq!(addr.is_multicast(), true);Sourcepub fn is_universal(&self) -> bool
pub fn is_universal(&self) -> bool
Returns true if the address is universally administered address (UAA).
§Example
let addr = MacAddr6::new(0x01, 0x00, 0x0C, 0xCC, 0xCC, 0xCC);
assert_eq!(addr.is_universal(), true);Trait Implementations§
Source§impl Clone for MacAddress
impl Clone for MacAddress
Source§fn clone(&self) -> MacAddress
fn clone(&self) -> MacAddress
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 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 Deref for MacAddress
impl Deref for MacAddress
Source§impl<'de> Deserialize<'de> for MacAddress
impl<'de> Deserialize<'de> for MacAddress
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 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§impl PartialOrd for MacAddress
impl PartialOrd for MacAddress
Source§impl Serialize for MacAddress
impl Serialize 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.