pub enum ClientStorage {
FileSystem(SyncImpl<ClientFileSystemStorage>),
Database(SyncImpl<ClientDatabaseStorage>),
}Expand description
Client account storage.
Variants§
FileSystem(SyncImpl<ClientFileSystemStorage>)
Filesystem storage.
Database(SyncImpl<ClientDatabaseStorage>)
Database storage.
Implementations§
Source§impl ClientStorage
impl ClientStorage
Sourcepub async fn new_unauthenticated(
target: BackendTarget,
account_id: &AccountId,
) -> Result<Self, Error>
pub async fn new_unauthenticated( target: BackendTarget, account_id: &AccountId, ) -> Result<Self, Error>
Create new client storage.
Sourcepub async fn new_account(
target: BackendTarget,
account_id: &AccountId,
account_name: String,
) -> Result<Self, Error>
pub async fn new_account( target: BackendTarget, account_id: &AccountId, account_name: String, ) -> Result<Self, Error>
Create a new account in client storage.
The account must not already exist.
Only to be used when fetching account data from a remote during device enrollment.
Sourcepub async fn rebuild_folder_vault(
target: BackendTarget,
account_id: &AccountId,
folder_id: &VaultId,
) -> Result<Vec<u8>, Error>
pub async fn rebuild_folder_vault( target: BackendTarget, account_id: &AccountId, folder_id: &VaultId, ) -> Result<Vec<u8>, Error>
Rebuild the vault for a folder from event logs.
Can be used to repair a vault from a collection of event logs or to convert server-side head-only vaults into the client-side representation.
§Authentication
Can be called when the account is not authenticated.
Trait Implementations§
Source§impl ClientAccountStorage for ClientStorage
impl ClientAccountStorage for ClientStorage
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,
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. Read more
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,
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,
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. Read more
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,
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.
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,
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,
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,
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. Read more
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,
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,
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,
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. Read more
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,
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,
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. Read more
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,
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. Read more
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,
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,
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,
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,
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. Read more
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,
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,
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. Read more
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,
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. Read more
Source§impl ClientBaseStorage for ClientStorage
impl ClientBaseStorage for ClientStorage
Source§fn account_id(&self) -> &AccountId
fn account_id(&self) -> &AccountId
Account identifier.
Source§fn authenticated_user(&self) -> Option<&Identity>
fn authenticated_user(&self) -> Option<&Identity>
Authenticated user information.
Source§fn authenticated_user_mut(&mut self) -> Option<&mut Identity>
fn authenticated_user_mut(&mut self) -> Option<&mut Identity>
Mutable authenticated user information.
Source§fn backend_target(&self) -> &BackendTarget
fn backend_target(&self) -> &BackendTarget
Backend target.
Source§fn is_authenticated(&self) -> bool
fn is_authenticated(&self) -> bool
Determine if the storage is authenticated.
Source§impl ClientDeviceStorage for ClientStorage
impl ClientDeviceStorage for ClientStorage
Source§fn devices(&self) -> &IndexSet<TrustedDevice>
fn devices(&self) -> &IndexSet<TrustedDevice>
Collection of trusted devices.
Source§fn list_trusted_devices(&self) -> Vec<&TrustedDevice>
fn list_trusted_devices(&self) -> Vec<&TrustedDevice>
List trusted devices.
Source§impl ClientFolderStorage for ClientStorage
impl ClientFolderStorage for ClientStorage
Source§fn read_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 VaultId,
) -> Pin<Box<dyn Future<Output = Result<Vault, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_vault<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 VaultId,
) -> Pin<Box<dyn Future<Output = Result<Vault, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read a vault from the storage.
Source§fn read_login_vault<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vault, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_login_vault<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vault, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the login vault from the storage.
Source§fn current_folder(&self) -> Option<Summary>
fn current_folder(&self) -> Option<Summary>
Currently open folder.
Source§fn open_folder(&self, folder_id: &VaultId) -> Result<ReadEvent, Error>
fn open_folder(&self, folder_id: &VaultId) -> Result<ReadEvent, Error>
Mark a folder as the currently open folder.
Source§fn close_folder(&self)
fn close_folder(&self)
Close the current open folder.
Source§fn read_device_vault<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vault>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn read_device_vault<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<Vault>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Read the device vault from the storage.
Source§fn list_folders(&self) -> &[Summary]
fn list_folders(&self) -> &[Summary]
List the in-memory folders.
Source§fn find_folder(&self, vault: &FolderRef) -> Option<&Summary>
fn find_folder(&self, vault: &FolderRef) -> Option<&Summary>
Find a folder in this storage by reference.
Source§fn find<F>(&self, predicate: F) -> Option<&Summary>
fn find<F>(&self, predicate: F) -> Option<&Summary>
Find a folder in this storage using a predicate.
Source§fn update_vault<'life0, 'life1, 'async_trait>(
&'life0 mut self,
vault: &'life1 Vault,
events: Vec<WriteEvent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_vault<'life0, 'life1, 'async_trait>(
&'life0 mut self,
vault: &'life1 Vault,
events: Vec<WriteEvent>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update an existing vault by replacing it with a new vault.
Source§fn load_folders<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<&[Summary], Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn load_folders<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<&[Summary], Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Read folders from storage and create the in-memory
event logs for each folder.
Source§fn remove_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove a folder from memory.
Source§fn import_folder_patches<'life0, 'async_trait>(
&'life0 mut self,
patches: HashMap<VaultId, FolderPatch>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
fn import_folder_patches<'life0, 'async_trait>(
&'life0 mut self,
patches: HashMap<VaultId, FolderPatch>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
Create folders from a collection of folder patches. Read more
Source§fn compact_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
key: &'life2 AccessKey,
) -> Pin<Box<dyn Future<Output = Result<AccountEvent, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn compact_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
key: &'life2 AccessKey,
) -> Pin<Box<dyn Future<Output = Result<AccountEvent, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Compact an event log file.
Source§fn rename_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
name: impl 'async_trait + AsRef<str> + Send,
) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rename_folder<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
name: impl 'async_trait + AsRef<str> + Send,
) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set the name of a folder.
Source§fn update_folder_flags<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
flags: VaultFlags,
) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_folder_flags<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
flags: VaultFlags,
) -> Pin<Box<dyn Future<Output = Result<Event, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the flags for a folder.
Source§fn description<'life0, 'life1, 'async_trait>(
&'life0 self,
folder_id: &'life1 VaultId,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn description<'life0, 'life1, 'async_trait>(
&'life0 self,
folder_id: &'life1 VaultId,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the description for a folder.
Source§fn set_description<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
description: impl 'async_trait + AsRef<str> + Send,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn set_description<'life0, 'life1, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
description: impl 'async_trait + AsRef<str> + Send,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set the description of the currently open folder.
Source§impl ForceMerge for ClientStorage
impl ForceMerge for ClientStorage
Source§fn force_merge_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
diff: FolderDiff,
outcome: &'life2 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn force_merge_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
diff: FolderDiff,
outcome: &'life2 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Force merge changes to the files event log.
Source§fn force_merge_identity<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: FolderDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn force_merge_identity<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: FolderDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Force merge changes to the identity folder.
Source§fn force_merge_update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
update_set: UpdateSet,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn force_merge_update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
update_set: UpdateSet,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Force merge from a set of updates. Read more
Source§fn force_merge_account<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: Diff<AccountEvent>,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn force_merge_account<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: Diff<AccountEvent>,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Force merge changes to the account event log.
Source§fn force_merge_device<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: Diff<DeviceEvent>,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn force_merge_device<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: Diff<DeviceEvent>,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Force merge changes to the devices event log.
Source§impl Merge for ClientStorage
impl Merge for ClientStorage
Source§fn merge_identity<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: FolderDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<CheckedPatch, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge_identity<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: FolderDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<CheckedPatch, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Merge changes to the identity folder.
Source§fn merge_account<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: AccountDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, HashSet<VaultId>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge_account<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: AccountDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, HashSet<VaultId>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Merge changes to the account event log.
Source§fn merge_device<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: DeviceDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<CheckedPatch, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn merge_device<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: DeviceDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<CheckedPatch, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Merge changes to the devices event log.
Source§fn merge_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
diff: FolderDiff,
outcome: &'life2 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, Vec<WriteEvent>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn merge_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder_id: &'life1 VaultId,
diff: FolderDiff,
outcome: &'life2 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<(CheckedPatch, Vec<WriteEvent>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Merge changes to a folder.
Source§fn compare_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn compare_identity<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Compare the identity folder.
Source§fn compare_account<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn compare_account<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Compare the account events.
Source§fn compare_device<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
fn compare_device<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Sync + 'async_trait,
Compare the device events.
Source§fn compare_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
folder_id: &'life1 Uuid,
state: &'life2 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
fn compare_folder<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
folder_id: &'life1 Uuid,
state: &'life2 CommitState,
) -> Pin<Box<dyn Future<Output = Result<Comparison, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: Sync + 'async_trait,
Compare folder events.
Source§fn compare<'life0, 'life1, 'async_trait>(
&'life0 mut self,
remote_status: &'life1 SyncStatus,
) -> Pin<Box<dyn Future<Output = Result<SyncCompare, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn compare<'life0, 'life1, 'async_trait>(
&'life0 mut self,
remote_status: &'life1 SyncStatus,
) -> Pin<Box<dyn Future<Output = Result<SyncCompare, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Compare the local state to a remote status.
Source§fn merge<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: SyncDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<SyncCompare, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
fn merge<'life0, 'life1, 'async_trait>(
&'life0 mut self,
diff: SyncDiff,
outcome: &'life1 mut MergeOutcome,
) -> Pin<Box<dyn Future<Output = Result<SyncCompare, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: Send + 'async_trait,
Merge a diff into this storage.
Source§impl StorageEventLogs for ClientStorage
impl StorageEventLogs for ClientStorage
Source§fn identity_log<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<FolderEventLog>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn identity_log<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<FolderEventLog>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clone of the identity log.
Source§fn account_log<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<AccountEventLog>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn account_log<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<AccountEventLog>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clone of the account log.
Source§fn device_log<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<DeviceEventLog>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn device_log<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<DeviceEventLog>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clone of the device log.
Source§impl SyncStorage for ClientStorage
impl SyncStorage for ClientStorage
Source§fn is_client_storage(&self) -> bool
fn is_client_storage(&self) -> bool
Determine if this is client-side storage.
Source§fn sync_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncStatus, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn sync_status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SyncStatus, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Sync status for the storage.
Auto Trait Implementations§
impl Freeze for ClientStorage
impl !RefUnwindSafe for ClientStorage
impl Send for ClientStorage
impl Sync for ClientStorage
impl Unpin for ClientStorage
impl !UnwindSafe for ClientStorage
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
Source§impl<T> ClientSecretStorage for T
impl<T> ClientSecretStorage for T
Source§fn create_secret<'life0, 'async_trait>(
&'life0 mut self,
secret_data: SecretRow,
options: AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<StorageChangeEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn create_secret<'life0, 'async_trait>(
&'life0 mut self,
secret_data: SecretRow,
options: AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<StorageChangeEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Create a secret in the currently open vault.
Source§fn raw_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
folder_id: &'life1 Uuid,
secret_id: &'life2 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(VaultCommit, ReadEvent)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn raw_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
folder_id: &'life1 Uuid,
secret_id: &'life2 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<(VaultCommit, ReadEvent)>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Read the encrypted contents of a secret.
Source§fn read_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
options: &'life2 AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<(Summary, SecretMeta, Secret, ReadEvent), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn read_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
options: &'life2 AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<(Summary, SecretMeta, Secret, ReadEvent), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Read a secret in the currently open folder.
Source§fn update_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 Uuid,
meta: SecretMeta,
secret: Option<Secret>,
options: AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<StorageChangeEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn update_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 Uuid,
meta: SecretMeta,
secret: Option<Secret>,
options: AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<StorageChangeEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Update a secret in the currently open folder.
fn write_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
folder: &'life1 Summary,
id: &'life2 Uuid,
secret_data: SecretRow,
is_update: bool,
__arg5: Internal,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Source§fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 Uuid,
options: AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<StorageChangeEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 Uuid,
options: AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<StorageChangeEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Delete a secret in the currently open vault.
Source§fn remove_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
id: &'life1 Uuid,
options: &'life2 AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
fn remove_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
id: &'life1 Uuid,
options: &'life2 AccessOptions,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
T: 'async_trait,
Remove a secret. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more