pub struct EncryptedBeacon {
pub node_id: NodeId,
pub capabilities: u16,
pub hierarchy_level: u8,
pub battery_percent: u8,
}Expand description
Encrypted beacon for privacy-preserving advertisements
Contains node identification and status that can only be read by mesh members with the beacon key.
Fields§
§node_id: NodeIdNode identifier (encrypted in wire format)
capabilities: u16Node capabilities bitmap (public)
hierarchy_level: u8Hierarchy level (public, for parent selection)
battery_percent: u8Battery percentage 0-100 (public)
Implementations§
Source§impl EncryptedBeacon
impl EncryptedBeacon
Sourcepub fn new(
node_id: NodeId,
capabilities: u16,
hierarchy_level: u8,
battery_percent: u8,
) -> Self
pub fn new( node_id: NodeId, capabilities: u16, hierarchy_level: u8, battery_percent: u8, ) -> Self
Create a new beacon with the given parameters
Sourcepub fn is_encrypted_beacon(data: &[u8]) -> bool
pub fn is_encrypted_beacon(data: &[u8]) -> bool
Check if data looks like an encrypted beacon (quick check)
Trait Implementations§
Source§impl Clone for EncryptedBeacon
impl Clone for EncryptedBeacon
Source§fn clone(&self) -> EncryptedBeacon
fn clone(&self) -> EncryptedBeacon
Returns a duplicate 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 EncryptedBeacon
impl Debug for EncryptedBeacon
Source§impl PartialEq for EncryptedBeacon
impl PartialEq for EncryptedBeacon
impl Eq for EncryptedBeacon
impl StructuralPartialEq for EncryptedBeacon
Auto Trait Implementations§
impl Freeze for EncryptedBeacon
impl RefUnwindSafe for EncryptedBeacon
impl Send for EncryptedBeacon
impl Sync for EncryptedBeacon
impl Unpin for EncryptedBeacon
impl UnwindSafe for EncryptedBeacon
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.