pub struct ExecutionSnapshot {
pub id: Uuid,
pub created_at: DateTime<Utc>,
pub label: Option<String>,
pub trigger_node: Option<NodeId>,
pub state: ExecutionState,
pub variables: HashMap<String, Value>,
pub node_results: HashMap<NodeId, NodeExecutionResult>,
pub metadata: SnapshotMetadata,
}Expand description
A point-in-time snapshot of execution state
Fields§
§id: UuidUnique snapshot identifier
created_at: DateTime<Utc>Timestamp when snapshot was created
label: Option<String>Label/description for this snapshot
trigger_node: Option<NodeId>Node that triggered this snapshot (if any)
state: ExecutionStateExecution state at snapshot time
variables: HashMap<String, Value>Variables at snapshot time
node_results: HashMap<NodeId, NodeExecutionResult>Node results at snapshot time
metadata: SnapshotMetadataMetadata for the snapshot
Implementations§
Source§impl ExecutionSnapshot
impl ExecutionSnapshot
Sourcepub fn from_context(ctx: &ExecutionContext) -> Self
pub fn from_context(ctx: &ExecutionContext) -> Self
Create a new snapshot from an execution context
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Create a snapshot with a label
Sourcepub fn with_trigger_node(self, node_id: NodeId) -> Self
pub fn with_trigger_node(self, node_id: NodeId) -> Self
Create a snapshot with a trigger node
Sourcepub fn with_reason(self, reason: impl Into<String>) -> Self
pub fn with_reason(self, reason: impl Into<String>) -> Self
Create a snapshot with a reason
Sourcepub fn apply_to(&self, ctx: &mut ExecutionContext)
pub fn apply_to(&self, ctx: &mut ExecutionContext)
Apply this snapshot to an execution context
Sourcepub fn completed_node_count(&self) -> usize
pub fn completed_node_count(&self) -> usize
Get the number of completed nodes in this snapshot
Sourcepub fn variable_count(&self) -> usize
pub fn variable_count(&self) -> usize
Get the variable count in this snapshot
Trait Implementations§
Source§impl Clone for ExecutionSnapshot
impl Clone for ExecutionSnapshot
Source§fn clone(&self) -> ExecutionSnapshot
fn clone(&self) -> ExecutionSnapshot
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 moreSource§impl Debug for ExecutionSnapshot
impl Debug for ExecutionSnapshot
Source§impl<'de> Deserialize<'de> for ExecutionSnapshot
impl<'de> Deserialize<'de> for ExecutionSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionSnapshot
impl RefUnwindSafe for ExecutionSnapshot
impl Send for ExecutionSnapshot
impl Sync for ExecutionSnapshot
impl Unpin for ExecutionSnapshot
impl UnwindSafe for ExecutionSnapshot
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