pub struct WorkflowCheckpoint { /* private fields */ }Expand description
Stable handle binding one workflow checkpoint identity to a store.
Implementations§
Source§impl WorkflowCheckpoint
impl WorkflowCheckpoint
Sourcepub fn new(store: Arc<dyn CheckpointStore>) -> Self
pub fn new(store: Arc<dyn CheckpointStore>) -> Self
Creates a new workflow checkpoint handle.
Sourcepub fn existing(id: CheckpointId, store: Arc<dyn CheckpointStore>) -> Self
pub fn existing(id: CheckpointId, store: Arc<dyn CheckpointStore>) -> Self
Reconnects to an existing workflow checkpoint.
Sourcepub fn distributed(store: Arc<dyn WorkflowStore>, lease: WorkflowLease) -> Self
pub fn distributed(store: Arc<dyn WorkflowStore>, lease: WorkflowLease) -> Self
Binds a distributed checkpoint to the current fenced workflow lease.
Sourcepub const fn id(&self) -> CheckpointId
pub const fn id(&self) -> CheckpointId
Returns the stable checkpoint identity.
Sourcepub fn load(
&self,
) -> Result<(Checkpoint, WorkflowCheckpointState), CheckpointError>
pub fn load( &self, ) -> Result<(Checkpoint, WorkflowCheckpointState), CheckpointError>
Loads and validates the latest typed workflow state.
§Errors
Returns CheckpointError for storage or payload failures.
Sourcepub async fn load_async(
&self,
) -> Result<(Checkpoint, WorkflowCheckpointState), CheckpointError>
pub async fn load_async( &self, ) -> Result<(Checkpoint, WorkflowCheckpointState), CheckpointError>
Loads and validates either a local or distributed checkpoint.
§Errors
Returns CheckpointError for ownership, storage, or payload failures.
Trait Implementations§
Source§impl Clone for WorkflowCheckpoint
impl Clone for WorkflowCheckpoint
Source§fn clone(&self) -> WorkflowCheckpoint
fn clone(&self) -> WorkflowCheckpoint
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 !RefUnwindSafe for WorkflowCheckpoint
impl !UnwindSafe for WorkflowCheckpoint
impl Freeze for WorkflowCheckpoint
impl Send for WorkflowCheckpoint
impl Sync for WorkflowCheckpoint
impl Unpin for WorkflowCheckpoint
impl UnsafeUnpin for WorkflowCheckpoint
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