pub struct StateSnapshot<State> {
pub values: State,
pub next_nodes: Vec<NodeId>,
pub tasks: Vec<NodeId>,
pub config: CheckpointConfig,
pub metadata: CheckpointMetadata,
pub parent_config: Option<CheckpointConfig>,
pub pending_interrupts: Vec<Interrupt>,
}Expand description
A point-in-time view of a thread’s checkpointed state, returned by
CompiledGraph::get_state and
CompiledGraph::get_state_history.
This is the state-inspection / time-travel surface: it bundles the committed channel values at a checkpoint with everything a caller needs to reason about or resume from that point — the next nodes that would run, the config that addresses this snapshot, the config of its parent (for walking the lineage), the checkpoint metadata (source/step/run id), and any pending interrupts.
Fields§
§values: StateCommitted graph state (channel values) at the snapshot’s checkpoint.
next_nodes: Vec<NodeId>Nodes that would run if execution resumed from this snapshot.
tasks: Vec<NodeId>Tasks scheduled for the next superstep (mirrors next_nodes).
config: CheckpointConfigConfig that addresses this snapshot’s checkpoint.
metadata: CheckpointMetadataLightweight metadata for the snapshot’s checkpoint (source, step, run id).
parent_config: Option<CheckpointConfig>Config addressing the parent checkpoint, when one exists.
pending_interrupts: Vec<Interrupt>Interrupts that paused the run at this checkpoint, if any.
Trait Implementations§
Source§impl<State: Clone> Clone for StateSnapshot<State>
impl<State: Clone> Clone for StateSnapshot<State>
Source§fn clone(&self) -> StateSnapshot<State>
fn clone(&self) -> StateSnapshot<State>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more