usecore::fmt;/// A six-octet Ethernet hardware address.
////// Ethernet destination and source address fields precede the protocol type in the
/// Ethernet encapsulation described by [RFC 894](https://www.rfc-editor.org/rfc/rfc894).
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]pubstructMacAddress([u8; 6]);implMacAddress{/// Constructs an address from its six wire-order octets.
////// Ethernet addresses occupy the destination and source fields described by
/// [RFC 894](https://www.rfc-editor.org/rfc/rfc894).
#[inline]pubconstfnnew(octets: [u8; 6])->Self{Self(octets)}/// Returns the six wire-order octets of this address.
////// The returned order is the Ethernet address-field order described by
/// [RFC 894](https://www.rfc-editor.org/rfc/rfc894).
#[inline]pubconstfnoctets(self)->[u8;6]{self.0}}implfmt::Display forMacAddress{fnfmt(&self, formatter:&mutfmt::Formatter<'_>)->fmt::Result{let[a, b, c, d, e, f]=self.0;write!(formatter,"{a:02x}:{b:02x}:{c:02x}:{d:02x}:{e:02x}:{f:02x}")}}