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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Provided Methods§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn lock<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: '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,
Sourcefn 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 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.
Sourcefn 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 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,
Sourcefn 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_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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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.