pub struct Eui(/* private fields */);Expand description
A gateway’s unique identifier, the eight bytes it puts in every datagram it sends.
It is written from the host’s MAC address, usually with FF FE in the middle, which is
why a Raspberry Pi gateway’s identifier starts with the three bytes of its network
interface.
§Examples
use pamoja_gateway::udp::Eui;
let gateway = Eui::from_hex("b827ebfffe010203").expect("sixteen hex digits");
assert_eq!(gateway.to_hex(), "b827ebfffe010203");
assert_eq!(gateway.bytes()[0], 0xB8);Implementations§
Trait Implementations§
impl Copy for Eui
impl Eq for Eui
Source§impl Ord for Eui
impl Ord for Eui
1.21.0 (const: unstable) · 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 PartialOrd for Eui
impl PartialOrd for Eui
impl StructuralPartialEq for Eui
Auto Trait Implementations§
impl Freeze for Eui
impl RefUnwindSafe for Eui
impl Send for Eui
impl Sync for Eui
impl Unpin for Eui
impl UnsafeUnpin for Eui
impl UnwindSafe for Eui
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