pub struct MemoryKeyProvider { /* private fields */ }Expand description
In-memory key provider for testing.
Implementations§
Trait Implementations§
Source§impl Default for MemoryKeyProvider
impl Default for MemoryKeyProvider
Source§impl KeyProvider for MemoryKeyProvider
impl KeyProvider for MemoryKeyProvider
Source§fn get_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EncryptionKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EncryptionKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a key by ID.
Source§fn get_active_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<EncryptionKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_active_key<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<EncryptionKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the active key for encryption.
Source§fn store_key<'life0, 'async_trait>(
&'life0 self,
key: EncryptionKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_key<'life0, 'async_trait>(
&'life0 self,
key: EncryptionKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store a new key.
Source§fn rotate_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EncryptionKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rotate_key<'life0, 'life1, 'async_trait>(
&'life0 self,
key_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EncryptionKey>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Rotate to a new key.
Auto Trait Implementations§
impl !Freeze for MemoryKeyProvider
impl !RefUnwindSafe for MemoryKeyProvider
impl Send for MemoryKeyProvider
impl Sync for MemoryKeyProvider
impl Unpin for MemoryKeyProvider
impl UnsafeUnpin for MemoryKeyProvider
impl !UnwindSafe for MemoryKeyProvider
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