pub struct MockKeyring { /* private fields */ }Expand description
In-memory, deterministic keyring for tests. Never touches the OS.
Implementations§
Trait Implementations§
Source§impl Default for MockKeyring
impl Default for MockKeyring
Source§fn default() -> MockKeyring
fn default() -> MockKeyring
Returns the “default value” for a type. Read more
Source§impl Keyring for MockKeyring
impl Keyring for MockKeyring
Source§fn get_master_key(&self) -> Result<MasterKey, CoreError>
fn get_master_key(&self) -> Result<MasterKey, CoreError>
Fetch the master key, materializing it (e.g. reading the OS keyring or
deriving from a passphrase).
Source§fn set_master_key(&self, key: &MasterKey) -> Result<(), CoreError>
fn set_master_key(&self, key: &MasterKey) -> Result<(), CoreError>
Persist the master key (e.g. write it to the OS keyring). Backends that
derive the key (see
Argon2Keyring) have nothing to store and return
an error.Auto Trait Implementations§
impl !Freeze for MockKeyring
impl RefUnwindSafe for MockKeyring
impl Send for MockKeyring
impl Sync for MockKeyring
impl Unpin for MockKeyring
impl UnsafeUnpin for MockKeyring
impl UnwindSafe for MockKeyring
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