pub struct InMemoryStorage { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Default for InMemoryStorage
impl Default for InMemoryStorage
Source§impl Storage for InMemoryStorage
impl Storage for InMemoryStorage
Source§fn health_check(&self) -> Result<()>
fn health_check(&self) -> Result<()>
Health check
Source§fn write_state(&self, record: StateRecord) -> Result<()>
fn write_state(&self, record: StateRecord) -> Result<()>
Write a state record
Source§fn read_state(&self, record_id: &RecordId) -> Result<Option<StateRecord>>
fn read_state(&self, record_id: &RecordId) -> Result<Option<StateRecord>>
Read a state record
Source§fn read_state_at_version(
&self,
record_id: &RecordId,
version: Version,
) -> Result<Option<StateRecord>>
fn read_state_at_version( &self, record_id: &RecordId, version: Version, ) -> Result<Option<StateRecord>>
Read state at specific version
Source§fn list_keys(&self, namespace: &str, agent_id: &str) -> Result<Vec<String>>
fn list_keys(&self, namespace: &str, agent_id: &str) -> Result<Vec<String>>
List all keys for an agent
Source§fn scan_prefix(
&self,
namespace: &str,
agent_id: &str,
prefix: &str,
) -> Result<Vec<StateRecord>>
fn scan_prefix( &self, namespace: &str, agent_id: &str, prefix: &str, ) -> Result<Vec<StateRecord>>
Scan keys with prefix
Source§fn append_event(&self, event: EventLogEntry) -> Result<()>
fn append_event(&self, event: EventLogEntry) -> Result<()>
Append event to log
Source§fn replay_events(
&self,
namespace: &str,
agent_id: &str,
start_ts: Option<CommitTs>,
end_ts: Option<CommitTs>,
) -> Result<Vec<EventLogEntry>>
fn replay_events( &self, namespace: &str, agent_id: &str, start_ts: Option<CommitTs>, end_ts: Option<CommitTs>, ) -> Result<Vec<EventLogEntry>>
Replay events for an agent
Source§fn next_commit_ts(&self) -> Result<CommitTs>
fn next_commit_ts(&self) -> Result<CommitTs>
Get next commit timestamp
Source§fn create_snapshot(&self) -> Result<Snapshot>
fn create_snapshot(&self) -> Result<Snapshot>
Create a snapshot of current state
Source§fn get_all_state(&self) -> Result<Vec<StateRecord>>
fn get_all_state(&self) -> Result<Vec<StateRecord>>
Get all state records (for snapshotting)
Auto Trait Implementations§
impl Freeze for InMemoryStorage
impl RefUnwindSafe for InMemoryStorage
impl Send for InMemoryStorage
impl Sync for InMemoryStorage
impl Unpin for InMemoryStorage
impl UnwindSafe for InMemoryStorage
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