pub struct FileCheckpointStorage { /* private fields */ }Expand description
File-based checkpoint storage: one JSON file per checkpoint in a directory.
Implementations§
Trait Implementations§
Source§impl CheckpointStorage for FileCheckpointStorage
impl CheckpointStorage for FileCheckpointStorage
Source§fn save<'life0, 'async_trait>(
&'life0 self,
checkpoint: WorkflowCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
FileCheckpointStorage: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
checkpoint: WorkflowCheckpoint,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
FileCheckpointStorage: 'async_trait,
Persist a checkpoint, returning its id.
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileCheckpointStorage: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileCheckpointStorage: 'async_trait,
Load a checkpoint by id, or
None if it does not exist.Source§fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileCheckpointStorage: 'async_trait,
fn list<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkflowCheckpoint>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileCheckpointStorage: 'async_trait,
List checkpoints, optionally filtered by workflow id.
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileCheckpointStorage: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
FileCheckpointStorage: 'async_trait,
Delete a checkpoint by id, returning whether it existed.
Source§impl Clone for FileCheckpointStorage
impl Clone for FileCheckpointStorage
Source§fn clone(&self) -> FileCheckpointStorage
fn clone(&self) -> FileCheckpointStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileCheckpointStorage
impl RefUnwindSafe for FileCheckpointStorage
impl Send for FileCheckpointStorage
impl Sync for FileCheckpointStorage
impl Unpin for FileCheckpointStorage
impl UnsafeUnpin for FileCheckpointStorage
impl UnwindSafe for FileCheckpointStorage
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