pub struct PairingRuntime {
pub pairing_mode: bool,
pub failures: u8,
pub locked_out: bool,
}Expand description
Per-power-cycle pairing policy state.
Keeping the event transitions pure makes the security-sensitive behavior testable without a controller or real BLE connection. The embedded task loads this state from atomics, applies one transition, and publishes it back without awaiting in between.
Fields§
§pairing_mode: bool§failures: u8§locked_out: boolImplementations§
Source§impl PairingRuntime
impl PairingRuntime
pub const fn record_failure(self, failure: PairingFailureClass) -> Self
Sourcepub const fn pairing_succeeded(self) -> Self
pub const fn pairing_succeeded(self) -> Self
Any successful pairing closes the window and clears prior failures.
This is independent of whether Trouble includes the completed bond in
the PairingComplete event or exposes it at the protected GATT edge.
Sourcepub const fn bonded_reconnect(self) -> Self
pub const fn bonded_reconnect(self) -> Self
Re-encryption by a known bond closes an accidentally-open window but does not rewrite the current failure counter.
Trait Implementations§
Source§impl Clone for PairingRuntime
impl Clone for PairingRuntime
Source§fn clone(&self) -> PairingRuntime
fn clone(&self) -> PairingRuntime
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PairingRuntime
impl Debug for PairingRuntime
Source§impl PartialEq for PairingRuntime
impl PartialEq for PairingRuntime
impl Copy for PairingRuntime
impl Eq for PairingRuntime
impl StructuralPartialEq for PairingRuntime
Auto Trait Implementations§
impl Freeze for PairingRuntime
impl RefUnwindSafe for PairingRuntime
impl Send for PairingRuntime
impl Sync for PairingRuntime
impl Unpin for PairingRuntime
impl UnwindSafe for PairingRuntime
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)