Enum smoltcp::wire::HardwareAddress
source · pub enum HardwareAddress {
Ethernet(EthernetAddress),
Ieee802154(Ieee802154Address),
}
Expand description
Representation of an hardware address, such as an Ethernet address or an IEEE802.15.4 address.
Variants§
Ethernet(EthernetAddress)
Ieee802154(Ieee802154Address)
Implementations§
source§impl HardwareAddress
impl HardwareAddress
pub const fn as_bytes(&self) -> &[u8] ⓘ
sourcepub fn is_unicast(&self) -> bool
pub fn is_unicast(&self) -> bool
Query wether the address is an unicast address.
sourcepub fn is_broadcast(&self) -> bool
pub fn is_broadcast(&self) -> bool
Query wether the address is a broadcast address.
Trait Implementations§
source§impl Clone for HardwareAddress
impl Clone for HardwareAddress
source§fn clone(&self) -> HardwareAddress
fn clone(&self) -> HardwareAddress
Returns a copy 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 HardwareAddress
impl Debug for HardwareAddress
source§impl Display for HardwareAddress
impl Display for HardwareAddress
source§impl From<Address> for HardwareAddress
impl From<Address> for HardwareAddress
source§fn from(addr: EthernetAddress) -> Self
fn from(addr: EthernetAddress) -> Self
Converts to this type from the input type.
source§impl From<Address> for HardwareAddress
impl From<Address> for HardwareAddress
source§fn from(addr: Ieee802154Address) -> Self
fn from(addr: Ieee802154Address) -> Self
Converts to this type from the input type.
source§impl From<HardwareAddress> for RawHardwareAddress
impl From<HardwareAddress> for RawHardwareAddress
source§fn from(addr: HardwareAddress) -> Self
fn from(addr: HardwareAddress) -> Self
Converts to this type from the input type.
source§impl PartialEq<HardwareAddress> for HardwareAddress
impl PartialEq<HardwareAddress> for HardwareAddress
source§fn eq(&self, other: &HardwareAddress) -> bool
fn eq(&self, other: &HardwareAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.