pub trait Storage:
Send
+ Sync
+ Debug {
Show 28 methods
// Required methods
fn backend(&self) -> StorageBackend;
fn metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageMetadata>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageHealth>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn insert<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + Serialize + DeserializeOwned + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn insert_with_ttl<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
ttl_seconds: i64,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StorageEntry<T>>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn update_versioned<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn execute_batch<'life0, 'async_trait>(
&'life0 self,
batch: Batch,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn query<'life0, 'async_trait, T>(
&'life0 self,
query: Query,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait;
fn count<'life0, 'async_trait>(
&'life0 self,
query: Query,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn begin_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Transaction>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn commit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn rollback_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn scan_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_multi<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
keys: Vec<String>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Option<StorageEntry<T>>>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_multi<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
keys: Vec<String>,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn compare_and_swap<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
expected_version: u64,
new_value: &'life3 T,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn get_modified_since<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_expiring_before<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
'life1: 'async_trait;
fn cleanup_expired<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn compact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Core storage trait defining unified interface for all backends
Required Methods§
Sourcefn backend(&self) -> StorageBackend
fn backend(&self) -> StorageBackend
Get backend type
Sourcefn metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get storage metadata
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageHealth>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageHealth>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check
Sourcefn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<StorageStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get statistics
Sourcefn insert<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + Serialize + DeserializeOwned + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn insert<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + Serialize + DeserializeOwned + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Insert a new entry
Sourcefn insert_with_ttl<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
ttl_seconds: i64,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
fn insert_with_ttl<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( &'life0 self, table: &'life1 str, key: &'life2 str, value: &'life3 T, ttl_seconds: i64, ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
Insert entry with TTL (time-to-live in seconds)
Sourcefn get<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Option<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get an entry by key
Sourcefn update<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
fn update<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( &'life0 self, table: &'life1 str, key: &'life2 str, value: &'life3 T, ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
Update an existing entry
Sourcefn update_versioned<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
value: &'life3 T,
expected_version: u64,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
fn update_versioned<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( &'life0 self, table: &'life1 str, key: &'life2 str, value: &'life3 T, expected_version: u64, ) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>
Update entry with optimistic locking (version check)
Sourcefn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete an entry
Sourcefn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn exists<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Check if entry exists
Sourcefn execute_batch<'life0, 'async_trait>(
&'life0 self,
batch: Batch,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_batch<'life0, 'async_trait>(
&'life0 self,
batch: Batch,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute batch operations
Sourcefn query<'life0, 'async_trait, T>(
&'life0 self,
query: Query,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
fn query<'life0, 'async_trait, T>(
&'life0 self,
query: Query,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
Query entries matching criteria
Sourcefn count<'life0, 'async_trait>(
&'life0 self,
query: Query,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 self,
query: Query,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Count entries matching criteria
Sourcefn begin_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Transaction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn begin_transaction<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<Transaction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Begin a transaction
Sourcefn commit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Commit a transaction
Sourcefn rollback_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rollback_transaction<'life0, 'async_trait>(
&'life0 self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Rollback a transaction
Sourcefn scan_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn scan_prefix<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
table: &'life1 str,
prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Scan keys with prefix
Sourcefn get_multi<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
keys: Vec<String>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Option<StorageEntry<T>>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_multi<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
keys: Vec<String>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<Option<StorageEntry<T>>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Get multiple entries by keys
Sourcefn delete_multi<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
keys: Vec<String>,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_multi<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
keys: Vec<String>,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete multiple entries
Sourcefn compare_and_swap<'life0, 'life1, 'life2, 'life3, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
key: &'life2 str,
expected_version: u64,
new_value: &'life3 T,
) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
fn compare_and_swap<'life0, 'life1, 'life2, 'life3, 'async_trait, T>( &'life0 self, table: &'life1 str, key: &'life2 str, expected_version: u64, new_value: &'life3 T, ) -> Pin<Box<dyn Future<Output = StorageResult<bool>> + Send + 'async_trait>>
Atomic compare-and-swap
Sourcefn get_modified_since<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_modified_since<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
since: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
'life1: 'async_trait,
Get entries modified after timestamp
Sourcefn get_expiring_before<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_expiring_before<'life0, 'life1, 'async_trait, T>(
&'life0 self,
table: &'life1 str,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<StorageEntry<T>>>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned + Serialize + Send + Sync + 'static,
'life0: 'async_trait,
'life1: 'async_trait,
Get entries that expire before timestamp
Sourcefn cleanup_expired<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cleanup_expired<'life0, 'life1, 'async_trait>(
&'life0 self,
table: &'life1 str,
) -> Pin<Box<dyn Future<Output = StorageResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cleanup expired entries
Sourcefn compact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn compact<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Compact storage (if supported)
Sourcefn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Flush pending writes
Sourcefn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = StorageResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize storage
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".