pub struct Checkpoint<S = State> {
pub checkpoint_id: CheckpointId,
pub current_node: NodeId,
pub state: S,
pub graph_hash: u64,
pub created_at: SystemTime,
}Expand description
执行检查点 — 物化快照 + 执行游标。
Checkpoint 的唯一职责:恢复(Restore)。
给我一个 Checkpoint,我就能从 current_node 开始,用 state 继续执行。
§Graph Compatibility
graph_hash 记录创建 Checkpoint 时的图结构指纹。
恢复时必须校验:graph_hash 不匹配 → 拒绝恢复(不允许 silent mismatch)。
Fields§
§checkpoint_id: CheckpointId唯一标识
current_node: NodeId下一个要执行的节点
state: S物化状态快照
graph_hash: u64图结构指纹 — 恢复时校验兼容性
created_at: SystemTime创建时间
Implementations§
Source§impl<S: WorkflowState> Checkpoint<S>
impl<S: WorkflowState> Checkpoint<S>
Trait Implementations§
Source§impl<S: Clone> Clone for Checkpoint<S>
impl<S: Clone> Clone for Checkpoint<S>
Source§fn clone(&self) -> Checkpoint<S>
fn clone(&self) -> Checkpoint<S>
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 moreSource§impl<S: Debug> Debug for Checkpoint<S>
impl<S: Debug> Debug for Checkpoint<S>
Source§impl<'de, S> Deserialize<'de> for Checkpoint<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for Checkpoint<S>where
S: Deserialize<'de>,
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<S> Freeze for Checkpoint<S>where
S: Freeze,
impl<S> RefUnwindSafe for Checkpoint<S>where
S: RefUnwindSafe,
impl<S> Send for Checkpoint<S>where
S: Send,
impl<S> Sync for Checkpoint<S>where
S: Sync,
impl<S> Unpin for Checkpoint<S>where
S: Unpin,
impl<S> UnsafeUnpin for Checkpoint<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Checkpoint<S>where
S: UnwindSafe,
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