pub struct InMemoryCheckpointStore<C: Context, WI: WorkItem> { /* private fields */ }Expand description
A simple in-memory checkpoint store using JSON serialization
Implementations§
Trait Implementations§
Source§impl<C: Context, WI: WorkItem> CheckpointStore<C, WI> for InMemoryCheckpointStore<C, WI>
impl<C: Context, WI: WorkItem> CheckpointStore<C, WI> for InMemoryCheckpointStore<C, WI>
Source§fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
checkpoint: &'life2 Checkpoint<C, WI>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
checkpoint: &'life2 Checkpoint<C, WI>,
) -> Pin<Box<dyn Future<Output = Result<(), CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Persist the given checkpoint under
workflow_id.Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint<C, WI>>, CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
workflow_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Checkpoint<C, WI>>, CheckpointError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the last-saved checkpoint for
workflow_id, if any.Auto Trait Implementations§
impl<C, WI> Freeze for InMemoryCheckpointStore<C, WI>
impl<C, WI> RefUnwindSafe for InMemoryCheckpointStore<C, WI>where
WI: RefUnwindSafe,
impl<C, WI> Send for InMemoryCheckpointStore<C, WI>
impl<C, WI> Sync for InMemoryCheckpointStore<C, WI>
impl<C, WI> Unpin for InMemoryCheckpointStore<C, WI>where
WI: Unpin,
impl<C, WI> UnwindSafe for InMemoryCheckpointStore<C, WI>where
WI: UnwindSafe,
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