pub struct StaticKeyProvider { /* private fields */ }Expand description
A fixed-key provider. Suitable for a local/self-hosted developer who derives a
32-byte key from their passphrase (e.g. Argon2id) and holds it for the
session. cold() models a locked vault for tests and for “no key yet” states.
Implementations§
Trait Implementations§
Source§impl Clone for StaticKeyProvider
impl Clone for StaticKeyProvider
Source§fn clone(&self) -> StaticKeyProvider
fn clone(&self) -> StaticKeyProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl KeyProvider for StaticKeyProvider
impl KeyProvider for StaticKeyProvider
Source§fn vault_key(&self) -> Result<Zeroizing<[u8; 32]>, CryptoError>
fn vault_key(&self) -> Result<Zeroizing<[u8; 32]>, CryptoError>
The 32-byte vault key, or
CryptoError::Cold if the vault is locked.Auto Trait Implementations§
impl Freeze for StaticKeyProvider
impl RefUnwindSafe for StaticKeyProvider
impl Send for StaticKeyProvider
impl Sync for StaticKeyProvider
impl Unpin for StaticKeyProvider
impl UnsafeUnpin for StaticKeyProvider
impl UnwindSafe for StaticKeyProvider
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