pub trait Storage: Send + Sync {
Show 14 methods fn load_config<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Config>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn save_config<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        config: &'life1 Config
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn delete_config<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn load_aid_cache<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u64>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn save_aid_cache<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        aid_cache: &'life1 [u64]
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn delete_aid_cache<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn load_pairing<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<Pairing>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn save_pairing<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        pairing: &'life1 Pairing
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn delete_pairing<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        id: &'life1 Uuid
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn list_pairings<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Pairing>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn count_pairings<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn load_bytes<'life0, 'life1, 'async_trait>(
        &'life0 self,
        key: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn save_bytes<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        key: &'life1 str,
        value: &'life2 [u8]
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; fn delete_bytes<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        key: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
}
Expand description

Storage is implemented by the persistent data storage methods HAP supports. Currently, that’s just FileStorage.

Required Methods

Loads the Config from the Storage.

Saves the Config to the Storage.

Deletes the Config from the Storage.

Loads the AID cache from the Storage.

Saves the AID cache to the Storage.

Deletes the AID cache from the Storage.

Loads a Pairing from the Storage.

Saves a Pairing to the Storage.

Deletes the Pairing from the Storage.

Loads all Pairings from the Storage.

Returns the count of Pairings stored on the Storage.

Loads arbitrary bytes from the Storage.

Saves arbitrary bytes to the Storage.

Deletes a set of arbitrary bytes from the Storage.

Implementors