pub struct NodeId(/* private fields */);Expand description
A 32-bit node identifier.
Derived from BLE MAC address or assigned during provisioning. Collision probability is acceptable for tactical mesh sizes (<1000 nodes).
Implementations§
Source§impl NodeId
impl NodeId
Sourcepub const fn from_le_bytes(bytes: [u8; 4]) -> Self
pub const fn from_le_bytes(bytes: [u8; 4]) -> Self
Create a NodeId from bytes (little-endian).
Sourcepub const fn from_be_bytes(bytes: [u8; 4]) -> Self
pub const fn from_be_bytes(bytes: [u8; 4]) -> Self
Create a NodeId from bytes (big-endian).
Sourcepub const fn to_le_bytes(self) -> [u8; 4]
pub const fn to_le_bytes(self) -> [u8; 4]
Convert to little-endian bytes.
Sourcepub const fn to_be_bytes(self) -> [u8; 4]
pub const fn to_be_bytes(self) -> [u8; 4]
Convert to big-endian bytes.
Trait Implementations§
impl Copy for NodeId
impl Eq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations§
impl Freeze for NodeId
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnsafeUnpin for NodeId
impl UnwindSafe for NodeId
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