pub struct PairingStore { /* private fields */ }Expand description
Thread-safe, atomically persisted HAP security store.
Implementations§
Source§impl PairingStore
impl PairingStore
Sourcepub fn load_or_create(
path: impl Into<PathBuf>,
) -> Result<PairingStoreProvisioning, HapError>
pub fn load_or_create( path: impl Into<PathBuf>, ) -> Result<PairingStoreProvisioning, HapError>
Open a store, or securely create identity/setup material and return the one-time setup code.
Sourcepub fn create(
path: impl Into<PathBuf>,
setup_code: SetupCode,
device_id: Option<String>,
) -> Result<Self, HapError>
pub fn create( path: impl Into<PathBuf>, setup_code: SetupCode, device_id: Option<String>, ) -> Result<Self, HapError>
Deterministic provisioning entry point for an externally generated per-accessory setup code and optional device ID.
pub fn path(&self) -> &Path
pub fn accessory_id(&self) -> Result<String, HapError>
pub fn accessory_public_key(&self) -> Result<[u8; 32], HapError>
pub fn list(&self) -> Result<Vec<ControllerPairing>, HapError>
pub fn get( &self, controller_id: &str, ) -> Result<Option<ControllerPairing>, HapError>
pub fn is_paired(&self) -> Result<bool, HapError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PairingStore
impl RefUnwindSafe for PairingStore
impl Send for PairingStore
impl Sync for PairingStore
impl Unpin for PairingStore
impl UnsafeUnpin for PairingStore
impl UnwindSafe for PairingStore
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