pub trait StorageBackend: Send + Sync {
// Required methods
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_decision<'life0, 'life1, 'async_trait>(
&'life0 self,
decision: &'life1 DecisionSnapshot,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Snapshot, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_decision<'life0, 'life1, 'async_trait>(
&'life0 self,
decision_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DecisionSnapshot, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query<'life0, 'async_trait>(
&'life0 self,
query: SnapshotQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Snapshot>, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FlushResult, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot: &'life1 Snapshot,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save a snapshot, return its ID
Sourcefn save_decision<'life0, 'life1, 'async_trait>(
&'life0 self,
decision: &'life1 DecisionSnapshot,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_decision<'life0, 'life1, 'async_trait>(
&'life0 self,
decision: &'life1 DecisionSnapshot,
) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save a single decision snapshot
Sourcefn load<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Snapshot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Snapshot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a snapshot by ID
Sourcefn load_decision<'life0, 'life1, 'async_trait>(
&'life0 self,
decision_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DecisionSnapshot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_decision<'life0, 'life1, 'async_trait>(
&'life0 self,
decision_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<DecisionSnapshot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load a decision by ID
Sourcefn query<'life0, 'async_trait>(
&'life0 self,
query: SnapshotQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Snapshot>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
query: SnapshotQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<Snapshot>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query snapshots with filters
Sourcefn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
snapshot_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a snapshot
Sourcefn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FlushResult, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<FlushResult, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Flush pending writes (for batching backends)
Sourcefn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Check health/connectivity