pub struct PauseCheckpointStore { /* private fields */ }Expand description
In-memory store for PauseCheckpoint instances.
Checkpoints are keyed by workflow_id. Saving a checkpoint with an
existing key overwrites the previous one.
Implementations§
Source§impl PauseCheckpointStore
impl PauseCheckpointStore
Sourcepub fn save(&mut self, checkpoint: PauseCheckpoint)
pub fn save(&mut self, checkpoint: PauseCheckpoint)
Save (insert or overwrite) a checkpoint.
Sourcepub fn load(&self, workflow_id: &str) -> Option<&PauseCheckpoint>
pub fn load(&self, workflow_id: &str) -> Option<&PauseCheckpoint>
Load a checkpoint by workflow ID.
Sourcepub fn delete(&mut self, workflow_id: &str) -> bool
pub fn delete(&mut self, workflow_id: &str) -> bool
Delete a checkpoint. Returns true if the checkpoint existed.
Sourcepub fn list_paused(&self) -> Vec<&PauseCheckpoint>
pub fn list_paused(&self) -> Vec<&PauseCheckpoint>
Return references to all stored checkpoints.
Trait Implementations§
Source§impl Debug for PauseCheckpointStore
impl Debug for PauseCheckpointStore
Source§impl Default for PauseCheckpointStore
impl Default for PauseCheckpointStore
Source§fn default() -> PauseCheckpointStore
fn default() -> PauseCheckpointStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PauseCheckpointStore
impl RefUnwindSafe for PauseCheckpointStore
impl Send for PauseCheckpointStore
impl Sync for PauseCheckpointStore
impl Unpin for PauseCheckpointStore
impl UnsafeUnpin for PauseCheckpointStore
impl UnwindSafe for PauseCheckpointStore
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