pub struct WorkflowContext {
pub workflow_id: WorkflowId,
pub is_replaying: bool,
pub attempt: u32,
}Expand description
Context provided to workflows during execution
Fields§
§workflow_id: WorkflowIdThe workflow ID
is_replaying: boolWhether this is a replay of a previous execution
attempt: u32Current attempt number
Implementations§
Source§impl WorkflowContext
impl WorkflowContext
Sourcepub fn new(workflow_id: WorkflowId) -> Self
pub fn new(workflow_id: WorkflowId) -> Self
Create a new workflow context
Sourcepub fn is_replaying(&self) -> bool
pub fn is_replaying(&self) -> bool
Check if the workflow is replaying
Trait Implementations§
Source§impl Clone for WorkflowContext
impl Clone for WorkflowContext
Source§fn clone(&self) -> WorkflowContext
fn clone(&self) -> WorkflowContext
Returns a duplicate of the value. Read more
1.0.0 · 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 WorkflowContext
impl RefUnwindSafe for WorkflowContext
impl Send for WorkflowContext
impl Sync for WorkflowContext
impl Unpin for WorkflowContext
impl UnwindSafe for WorkflowContext
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