pub trait KeyIdStorage: StorageSendSyncMaybe {
// Required methods
fn insert_key_id<'life0, 'async_trait>(
&'life0 self,
method_digest: MethodDigest,
key_id: KeyId,
) -> Pin<Box<dyn Future<Output = Result<(), SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_key_id<'life0, 'life1, 'async_trait>(
&'life0 self,
method_digest: &'life1 MethodDigest,
) -> Pin<Box<dyn Future<Output = Result<KeyId, SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn delete_key_id<'life0, 'life1, 'async_trait>(
&'life0 self,
method_digest: &'life1 MethodDigest,
) -> Pin<Box<dyn Future<Output = Result<(), SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
Key value Storage for KeyId
under MethodDigest
.
Required Methods§
Sourcefn insert_key_id<'life0, 'async_trait>(
&'life0 self,
method_digest: MethodDigest,
key_id: KeyId,
) -> Pin<Box<dyn Future<Output = Result<(), SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn insert_key_id<'life0, 'async_trait>(
&'life0 self,
method_digest: MethodDigest,
key_id: KeyId,
) -> Pin<Box<dyn Future<Output = Result<(), SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Insert a KeyId
into the KeyIdStorage
under the given MethodDigest
.
If an entry for key
already exists in the storage an error must be returned
immediately without altering the state of the storage.
Sourcefn get_key_id<'life0, 'life1, 'async_trait>(
&'life0 self,
method_digest: &'life1 MethodDigest,
) -> Pin<Box<dyn Future<Output = Result<KeyId, SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_key_id<'life0, 'life1, 'async_trait>(
&'life0 self,
method_digest: &'life1 MethodDigest,
) -> Pin<Box<dyn Future<Output = Result<KeyId, SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Obtain the KeyId
associated with the given MethodDigest
.
Sourcefn delete_key_id<'life0, 'life1, 'async_trait>(
&'life0 self,
method_digest: &'life1 MethodDigest,
) -> Pin<Box<dyn Future<Output = Result<(), SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn delete_key_id<'life0, 'life1, 'async_trait>(
&'life0 self,
method_digest: &'life1 MethodDigest,
) -> Pin<Box<dyn Future<Output = Result<(), SingleStructError<KeyIdStorageErrorKind>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Delete the KeyId
associated with the given MethodDigest
from the KeyIdStorage
.
If key
is not found in storage, an Error must be returned.