Enum ClientStorage

Source
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

Source

pub async fn new_unauthenticated( target: BackendTarget, account_id: &AccountId, ) -> Result<Self, Error>

Create new client storage.

Source

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.

Source

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

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. 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,

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. 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,

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,

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. 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,

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. 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,

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. 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,

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,

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. 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,

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. 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,

Get the commit state for a folder. Read more
Source§

impl ClientBaseStorage for ClientStorage

Source§

fn account_id(&self) -> &AccountId

Account identifier.
Source§

fn authenticated_user(&self) -> Option<&Identity>

Authenticated user information.
Source§

fn authenticated_user_mut(&mut self) -> Option<&mut Identity>

Mutable authenticated user information.
Source§

fn paths(&self) -> Arc<Paths>

Computed storage paths.
Source§

fn backend_target(&self) -> &BackendTarget

Backend target.
Source§

fn is_authenticated(&self) -> bool

Determine if the storage is authenticated.
Source§

impl ClientDeviceStorage for ClientStorage

Source§

fn devices(&self) -> &IndexSet<TrustedDevice>

Collection of trusted devices.
Source§

fn list_trusted_devices(&self) -> Vec<&TrustedDevice>

List trusted devices.
Source§

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

Patch the devices event log.
Source§

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

Revoke trust in a device.
Source§

impl ClientFolderStorage for ClientStorage

Source§

fn folders(&self) -> &HashMap<VaultId, Folder>

In-memory folders.
Source§

fn folders_mut(&mut self) -> &mut HashMap<VaultId, Folder>

Mutable in-memory folders.
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,

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,

Read the login vault from the storage.
Source§

fn current_folder(&self) -> Option<Summary>

Currently open folder.
Source§

fn open_folder(&self, folder_id: &VaultId) -> Result<ReadEvent, Error>

Mark a folder as the currently open folder.
Source§

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,

Read the device vault from the storage.
Source§

fn list_folders(&self) -> &[Summary]

List the in-memory folders.
Source§

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>
where F: FnMut(&&Summary) -> bool,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Set the description of the currently open folder.
Source§

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,

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,

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,

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,

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,

Force merge changes to the devices event log.
Source§

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Merge a diff into this storage.
Source§

impl StorageEventLogs for ClientStorage

Source§

type Error = Error

Error type for storage event logs.
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,

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,

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,

Clone of the device log.
Source§

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

Folders managed by this storage. Read more
Source§

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

Folder event log.
Source§

impl SyncStorage for ClientStorage

Source§

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,

Sync status for the storage.
Source§

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

Set of all event logs. Read more
Source§

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

Create a debug tree of this account.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

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,

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,

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,

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,

Update a secret in the currently open folder.
Source§

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,

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,

Remove a secret. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,