pub enum HardwareAddress {
Ip,
Ethernet(Address),
Ieee802154(Address),
}
Expand description
Representation of an hardware address, such as an Ethernet address or an IEEE802.15.4 address.
Variants§
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 whether the address is an unicast address.
Sourcepub fn is_broadcast(&self) -> bool
pub fn is_broadcast(&self) -> bool
Query whether 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 Format for HardwareAddress
impl Format for HardwareAddress
Source§impl From<Address> for HardwareAddress
impl From<Address> for HardwareAddress
Source§fn from(addr: Address) -> HardwareAddress
fn from(addr: Address) -> HardwareAddress
Converts to this type from the input type.
Source§impl From<Address> for HardwareAddress
impl From<Address> for HardwareAddress
Source§fn from(addr: Address) -> HardwareAddress
fn from(addr: Address) -> HardwareAddress
Converts to this type from the input type.
Source§impl PartialEq for HardwareAddress
impl PartialEq for HardwareAddress
impl Copy for HardwareAddress
impl Eq for HardwareAddress
impl StructuralPartialEq for HardwareAddress
Auto Trait Implementations§
impl Freeze for HardwareAddress
impl RefUnwindSafe for HardwareAddress
impl Send for HardwareAddress
impl Sync for HardwareAddress
impl Unpin for HardwareAddress
impl UnwindSafe for HardwareAddress
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)