pub struct InMemoryCheckpointStore<S> { /* private fields */ }Expand description
In-memory checkpoint store backed by a RwLock<HashMap>.
Suitable for tests and single-process usage where durability is not
required. Production deployments should implement CheckpointStore
with durable storage (e.g. SQLite via khive-db).
Implementations§
Source§impl<S> InMemoryCheckpointStore<S>
impl<S> InMemoryCheckpointStore<S>
Trait Implementations§
Source§impl<S: Clone + Send + Sync + Serialize + 'static> CheckpointStore<S> for InMemoryCheckpointStore<S>
impl<S: Clone + Send + Sync + Serialize + 'static> CheckpointStore<S> for InMemoryCheckpointStore<S>
Source§fn save(&self, checkpoint: Checkpoint<S>) -> Result<(), FoldError>
fn save(&self, checkpoint: Checkpoint<S>) -> Result<(), FoldError>
Persist a checkpoint, computing and storing an integrity hash.
Source§fn load(&self, id: &str) -> Result<Option<Checkpoint<S>>, FoldError>
fn load(&self, id: &str) -> Result<Option<Checkpoint<S>>, FoldError>
Load a checkpoint by its exact
id, verifying the integrity hash. Read moreSource§fn load_latest(&self, prefix: &str) -> Result<Option<Checkpoint<S>>, FoldError>
fn load_latest(&self, prefix: &str) -> Result<Option<Checkpoint<S>>, FoldError>
Auto Trait Implementations§
impl<S> Freeze for InMemoryCheckpointStore<S>
impl<S> RefUnwindSafe for InMemoryCheckpointStore<S>
impl<S> Send for InMemoryCheckpointStore<S>
impl<S> Sync for InMemoryCheckpointStore<S>
impl<S> Unpin for InMemoryCheckpointStore<S>
impl<S> UnsafeUnpin for InMemoryCheckpointStore<S>
impl<S> UnwindSafe for InMemoryCheckpointStore<S>
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