pub struct BleAdvertisement {
pub kind: u8,
pub flags: u8,
pub short_id: [u8; 4],
}Expand description
Manufacturer-data payload after the 2-byte company ID.
Fields§
§kind: u8§flags: u8§short_id: [u8; 4]Implementations§
Source§impl BleAdvertisement
impl BleAdvertisement
pub const LEN: usize = 9
pub fn encode(&self) -> [u8; 9]
Sourcepub fn decode(data: &[u8]) -> Option<Self>
pub fn decode(data: &[u8]) -> Option<Self>
data excludes the company ID. Unknown magic or version yields None.
pub fn commissionable(&self) -> bool
pub fn wifi_configured(&self) -> bool
pub fn short_id_hex(&self) -> String
Trait Implementations§
Source§impl Clone for BleAdvertisement
impl Clone for BleAdvertisement
impl Copy for BleAdvertisement
Source§impl Debug for BleAdvertisement
impl Debug for BleAdvertisement
impl Eq for BleAdvertisement
Source§impl PartialEq for BleAdvertisement
impl PartialEq for BleAdvertisement
impl StructuralPartialEq for BleAdvertisement
Auto Trait Implementations§
impl Freeze for BleAdvertisement
impl RefUnwindSafe for BleAdvertisement
impl Send for BleAdvertisement
impl Sync for BleAdvertisement
impl Unpin for BleAdvertisement
impl UnsafeUnpin for BleAdvertisement
impl UnwindSafe for BleAdvertisement
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