pub enum VaultWriter {
Database(VaultDatabaseWriter<Error>),
FileSystem(VaultFileWriter<Error>),
}Expand description
Backend vault writer.
Variants§
Database(VaultDatabaseWriter<Error>)
Vault backed by a database table.
FileSystem(VaultFileWriter<Error>)
Vault backed by a file on disc.
Implementations§
Source§impl VaultWriter
impl VaultWriter
Sourcepub fn new(target: BackendTarget, folder_id: &VaultId) -> Self
pub fn new(target: BackendTarget, folder_id: &VaultId) -> Self
Create a new vault writer.
Trait Implementations§
Source§impl EncryptedEntry for VaultWriter
impl EncryptedEntry for VaultWriter
Source§fn summary<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Summary, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn summary<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Summary, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the vault summary.
Source§fn vault_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Cow<'_, str>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn vault_name<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Cow<'_, str>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the name of a vault.
Source§fn set_vault_name<'life0, 'async_trait>(
&'life0 mut self,
name: String,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_vault_name<'life0, 'async_trait>(
&'life0 mut self,
name: String,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set the name of a vault.
Source§fn set_vault_flags<'life0, 'async_trait>(
&'life0 mut self,
flags: VaultFlags,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_vault_flags<'life0, 'async_trait>(
&'life0 mut self,
flags: VaultFlags,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set the flags for a vault.
Source§fn set_vault_meta<'life0, 'async_trait>(
&'life0 mut self,
meta: AeadPack,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_vault_meta<'life0, 'async_trait>(
&'life0 mut self,
meta: AeadPack,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set the vault meta data.
Source§fn create_secret<'life0, 'async_trait>(
&'life0 mut self,
commit: CommitHash,
secret: VaultEntry,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_secret<'life0, 'async_trait>(
&'life0 mut self,
commit: CommitHash,
secret: VaultEntry,
) -> Pin<Box<dyn Future<Output = Result<WriteEvent, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add an encrypted secret to the vault.
Source§fn read_secret<'a, 'life0, 'async_trait>(
&'a self,
secret_id: &'life0 SecretId,
) -> Pin<Box<dyn Future<Output = Result<Option<(Cow<'a, VaultCommit>, ReadEvent)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn read_secret<'a, 'life0, 'async_trait>(
&'a self,
secret_id: &'life0 SecretId,
) -> Pin<Box<dyn Future<Output = Result<Option<(Cow<'a, VaultCommit>, ReadEvent)>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Get an encrypted secret from the vault.
Source§fn update_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 SecretId,
commit: CommitHash,
secret: VaultEntry,
) -> Pin<Box<dyn Future<Output = Result<Option<WriteEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 SecretId,
commit: CommitHash,
secret: VaultEntry,
) -> Pin<Box<dyn Future<Output = Result<Option<WriteEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update an encrypted secret in the vault.
Source§fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 SecretId,
) -> Pin<Box<dyn Future<Output = Result<Option<WriteEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 mut self,
secret_id: &'life1 SecretId,
) -> Pin<Box<dyn Future<Output = Result<Option<WriteEvent>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove an encrypted secret from the vault.
Auto Trait Implementations§
impl Freeze for VaultWriter
impl !RefUnwindSafe for VaultWriter
impl Send for VaultWriter
impl Sync for VaultWriter
impl Unpin for VaultWriter
impl !UnwindSafe for VaultWriter
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