pub struct Checkpoint {
pub checkpoint_id: CheckpointId,
pub parent_trace_id: TraceId,
pub graph_hash: String,
pub current_node: NodeId,
pub state: State,
pub created_at: String,
pub snapshot: Option<StateSnapshot>,
}Expand description
Checkpoint — Materialized State + Execution Cursor。
Fields§
§checkpoint_id: CheckpointId§parent_trace_id: TraceId§graph_hash: String§current_node: NodeId§state: State§created_at: String§snapshot: Option<StateSnapshot>Implementations§
Source§impl Checkpoint
impl Checkpoint
pub fn new( parent_trace_id: TraceId, graph_hash: impl Into<String>, current_node: impl Into<String>, state: State, ) -> Self
pub fn with_snapshot( parent_trace_id: TraceId, graph_hash: impl Into<String>, current_node: impl Into<String>, current_state: State, base_snapshot: State, recent_deltas: Vec<StateDelta>, ) -> Self
pub fn restore_state( &self, registry: &ReducerRegistry, ) -> Result<State, StateError>
pub fn restore_state_simple(&self) -> State
Trait Implementations§
Source§impl CheckpointExt for Checkpoint
impl CheckpointExt for Checkpoint
Source§impl Clone for Checkpoint
impl Clone for Checkpoint
Source§fn clone(&self) -> Checkpoint
fn clone(&self) -> Checkpoint
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 Debug for Checkpoint
impl Debug for Checkpoint
Source§impl<'de> Deserialize<'de> for Checkpoint
impl<'de> Deserialize<'de> for Checkpoint
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 Checkpoint
impl RefUnwindSafe for Checkpoint
impl Send for Checkpoint
impl Sync for Checkpoint
impl Unpin for Checkpoint
impl UnsafeUnpin for Checkpoint
impl UnwindSafe for Checkpoint
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