ClientAccountStorage

Trait ClientAccountStorage 

Source
pub trait ClientAccountStorage:
    StorageEventLogs<Error = Error>
    + ClientBaseStorage
    + ClientDeviceStorage
    + ClientFolderStorage
    + ClientSecretStorage
    + ClientEventLogStorage {
Show 20 methods // Required methods fn import_account<'life0, 'life1, 'async_trait>( &'life0 mut self, account_data: &'life1 CreateSet, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_secret_ids<'life0, 'life1, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<Vec<SecretId>, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn create_device_vault<'life0, 'life1, 'async_trait>( &'life0 mut self, device_vault: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_account<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn rename_account<'life0, 'async_trait>( &'life0 mut self, account_name: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn authenticate<'life0, 'async_trait>( &'life0 mut self, authenticated_user: Identity, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn change_password<'life0, 'life1, 'async_trait>( &'life0 mut self, vault: &'life1 Vault, current_key: AccessKey, new_key: AccessKey, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn sign_out<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn unlock<'life0, 'life1, 'async_trait>( &'life0 mut self, keys: &'life1 FolderKeys, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn unlock_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, folder_id: &'life1 VaultId, key: &'life2 AccessKey, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn lock_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn create_account<'life0, 'life1, 'async_trait>( &'life0 mut self, account: &'life1 AccountPack, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn create_folder<'life0, 'async_trait>( &'life0 mut self, options: NewFolderOptions, ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, AccessKey, Summary, AccountEvent), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait { ... } fn delete_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, folder_id: &'life1 VaultId, apply_event: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn restore_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, records: Vec<EventRecord>, key: &'life1 AccessKey, ) -> Pin<Box<dyn Future<Output = Result<Summary, Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn import_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, buffer: impl 'async_trait + AsRef<[u8]> + Send, key: Option<&'life1 AccessKey>, apply_event: bool, creation_time: Option<&'life2 UtcDateTime>, ) -> Pin<Box<dyn Future<Output = Result<(Event, Summary), Error>> + Send + 'async_trait>> where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn history<'life0, 'life1, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<Vec<(CommitHash, UtcDateTime, WriteEvent)>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn identity_state<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<CommitState, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn commit_state<'life0, 'life1, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<CommitState, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}
Expand description

Account management for client storage.

Required Methods§

Source

fn import_account<'life0, 'life1, 'async_trait>( &'life0 mut self, account_data: &'life1 CreateSet, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Import an account from a change set of event logs.

Intended to be used during pairing to create a new account from a collection of patches.

§Authentication

Can be called when the storage is not authenticated.

Source

fn list_secret_ids<'life0, 'life1, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<Vec<SecretId>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List the secret ids for a folder.

Source

fn create_device_vault<'life0, 'life1, 'async_trait>( &'life0 mut self, device_vault: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a device vault from a buffer.

Used during pairing enrollment to initialize a device vault received from the authorizing device.

§Authentication

Can be called when the storage is not authenticated.

Source

fn delete_account<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete the account for this user.

Provided Methods§

Source

fn rename_account<'life0, 'async_trait>( &'life0 mut self, account_name: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Rename the account.

Source

fn authenticate<'life0, 'async_trait>( &'life0 mut self, authenticated_user: Identity, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Set the storage as authenticated.

Source

fn change_password<'life0, 'life1, 'async_trait>( &'life0 mut self, vault: &'life1 Vault, current_key: AccessKey, new_key: AccessKey, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Change the password for a folder.

If the target folder is the currently selected folder the currently selected vault is unlocked with the new passphrase on success.

Source

fn sign_out<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Sign out the authenticated user.

Source

fn unlock<'life0, 'life1, 'async_trait>( &'life0 mut self, keys: &'life1 FolderKeys, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Unlock all folders.

Source

fn lock<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Lock all folders.

§Authentication

Can be called when the storage is not authenticated.

Source

fn unlock_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, folder_id: &'life1 VaultId, key: &'life2 AccessKey, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Unlock a folder.

Source

fn lock_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lock a folder.

§Authentication

Can be called when the storage is not authenticated.

Source

fn create_account<'life0, 'life1, 'async_trait>( &'life0 mut self, account: &'life1 AccountPack, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create the data for a new account.

§Authentication

Can be called when the storage is not authenticated.

Source

fn create_folder<'life0, 'async_trait>( &'life0 mut self, options: NewFolderOptions, ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, AccessKey, Summary, AccountEvent), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Create a new folder.

Source

fn delete_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, folder_id: &'life1 VaultId, apply_event: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Delete a folder.

Source

fn restore_folder<'life0, 'life1, 'async_trait>( &'life0 mut self, records: Vec<EventRecord>, key: &'life1 AccessKey, ) -> Pin<Box<dyn Future<Output = Result<Summary, Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Restore a folder from an event log.

Source

fn import_folder<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, buffer: impl 'async_trait + AsRef<[u8]> + Send, key: Option<&'life1 AccessKey>, apply_event: bool, creation_time: Option<&'life2 UtcDateTime>, ) -> Pin<Box<dyn Future<Output = Result<(Event, Summary), Error>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Import a folder into an existing account.

If a folder with the same identifier already exists it is overwritten.

Buffer is the encoded representation of the vault.

§Authentication

Can be called when the account is not authenticated.

Source

fn history<'life0, 'life1, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<Vec<(CommitHash, UtcDateTime, WriteEvent)>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the history of events for a vault.

Source

fn identity_state<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<CommitState, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Commit state of the identity folder.

§Authentication

Can be called when the account is not authenticated.

Source

fn commit_state<'life0, 'life1, 'async_trait>( &'life0 self, folder_id: &'life1 VaultId, ) -> Pin<Box<dyn Future<Output = Result<CommitState, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the commit state for a folder.

The folder must have at least one commit.

§Authentication

Can be called when the account is not authenticated.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§