Trait redact_crypto::storage::KeyStorer [−][src]
pub trait KeyStorer: Clone + Send + Sync { #[must_use] fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; #[must_use] fn list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; #[must_use] fn create<'life0, 'async_trait>(
&'life0 self,
value: Key
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; }
Expand description
The operations a storer of Key
structs must be able to fulfill.
Required methods
#[must_use]fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]Fetches the instance of the Key
with the given name.
#[must_use]fn list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
#[must_use]fn list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]Fetches a list of all the stored keys.
Implementors
impl KeyStorer for MongoKeyStorer
[src]
impl KeyStorer for MongoKeyStorer
[src]fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
value: Key
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
value: Key
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl KeyStorer for RedactKeyStorer
[src]
impl KeyStorer for RedactKeyStorer
[src]fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
value: Key
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
value: Key
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl KeyStorer for MockKeyStorer
[src]
impl KeyStorer for MockKeyStorer
[src]fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
path: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Key, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn list<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<KeyCollection, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
value: Key
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
value: Key
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,