pub struct WorkflowState {
pub workflow_id: String,
pub current_step: Option<String>,
pub completed_steps: Vec<String>,
pub workflow_data: HashMap<String, Value>,
pub status: WorkflowStatus,
pub started_at: Instant,
pub completed_at: Option<Instant>,
}Expand description
Tracks the state of a workflow execution
Fields§
§workflow_id: StringUnique workflow identifier
current_step: Option<String>Current active step/agenda group
completed_steps: Vec<String>List of completed steps
workflow_data: HashMap<String, Value>Workflow-specific data storage
status: WorkflowStatusCurrent status of the workflow
started_at: InstantWorkflow start time
completed_at: Option<Instant>Workflow completion time
Implementations§
Source§impl WorkflowState
impl WorkflowState
Sourcepub fn complete_step(&mut self, step: String)
pub fn complete_step(&mut self, step: String)
Mark a step as completed
Sourcepub fn set_current_step(&mut self, step: String)
pub fn set_current_step(&mut self, step: String)
Set the current active step
Trait Implementations§
Source§impl Clone for WorkflowState
impl Clone for WorkflowState
Source§fn clone(&self) -> WorkflowState
fn clone(&self) -> WorkflowState
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 WorkflowState
impl RefUnwindSafe for WorkflowState
impl Send for WorkflowState
impl Sync for WorkflowState
impl Unpin for WorkflowState
impl UnwindSafe for WorkflowState
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