pub struct MemoryStorageBackend { /* private fields */ }Expand description
In-memory synchronous storage backend for simple use cases
Implementations§
Trait Implementations§
Source§impl Default for MemoryStorageBackend
impl Default for MemoryStorageBackend
Source§impl SyncStorageBackend for MemoryStorageBackend
impl SyncStorageBackend for MemoryStorageBackend
Source§fn save(&self, snapshot: &Snapshot) -> Result<String, StorageError>
fn save(&self, snapshot: &Snapshot) -> Result<String, StorageError>
Save a snapshot, return its ID
Source§fn save_decision(
&self,
decision: &DecisionSnapshot,
) -> Result<String, StorageError>
fn save_decision( &self, decision: &DecisionSnapshot, ) -> Result<String, StorageError>
Save a single decision snapshot
Source§fn load_decision(
&self,
decision_id: &str,
) -> Result<DecisionSnapshot, StorageError>
fn load_decision( &self, decision_id: &str, ) -> Result<DecisionSnapshot, StorageError>
Load a decision by ID
Source§fn query(&self, query: SnapshotQuery) -> Result<Vec<Snapshot>, StorageError>
fn query(&self, query: SnapshotQuery) -> Result<Vec<Snapshot>, StorageError>
Query snapshots with filters
Source§fn flush(&self) -> Result<FlushResult, StorageError>
fn flush(&self) -> Result<FlushResult, StorageError>
Flush pending writes (for batching backends)
Source§fn health_check(&self) -> Result<bool, StorageError>
fn health_check(&self) -> Result<bool, StorageError>
Check health/connectivity
Auto Trait Implementations§
impl !Freeze for MemoryStorageBackend
impl RefUnwindSafe for MemoryStorageBackend
impl Send for MemoryStorageBackend
impl Sync for MemoryStorageBackend
impl Unpin for MemoryStorageBackend
impl UnwindSafe for MemoryStorageBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more