Trait iota_wallet::storage::adapter::StorageAdapter
source · [−]pub trait StorageAdapter: Debug {
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn set<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str,
record: String
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn batch_set<'life0, 'async_trait>(
&'life0 mut self,
records: HashMap<String, String>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn remove<'life0, 'life1, 'async_trait>(
&'life0 mut self,
key: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn id(&self) -> &'static str { ... }
}
Expand description
The storage adapter.
Required Methods
Gets the record associated with the given key from the storage.
Saves or updates a record on the storage.
Batch write.