pub struct Context {
pub address: Option<AddressBytes>,
pub bthome_keys: HashMap<AddressBytes, [u8; 16]>,
pub kkm_passwords: HashMap<AddressBytes, String>,
}Expand description
What a decoder may need beyond the advertisement itself.
Fields§
§address: Option<AddressBytes>The advertiser’s address (least significant byte first): BTHome’s nonce and KKM’s key derivation include it. Without it encrypted frames are reported as encrypted but not decrypted.
bthome_keys: HashMap<AddressBytes, [u8; 16]>BTHome bind keys by device address.
kkm_passwords: HashMap<AddressBytes, String>KKM beacon passwords by device address (encrypted sensor frames).
Implementations§
Source§impl Context
impl Context
Sourcepub fn for_address(address: AddressBytes) -> Self
pub fn for_address(address: AddressBytes) -> Self
A context for one advertiser, with no keys.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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