pub struct Checkpoint {Show 13 fields
pub id: String,
pub graph_name: String,
pub current_node: String,
pub state_snapshot: Value,
pub path: Vec<String>,
pub step_count: usize,
pub created_at: DateTime<Utc>,
pub pending_action: Option<Value>,
pub interrupt_type: InterruptType,
pub parent_checkpoint_id: Option<String>,
pub label: Option<String>,
pub tags: Vec<String>,
pub branch: Option<String>,
}Expand description
Checkpoint - snapshot of graph execution state
Contains all information needed to resume execution:
- Execution path and step count
- Shared state snapshot
- Pending node information
Supports time-travel debugging via parent_checkpoint_id lineage,
human-readable label/tags, and branch forking.
Fields§
§id: StringUnique identifier
graph_name: StringGraph name
current_node: StringCurrent node
state_snapshot: ValueState snapshot (JSON serialized)
path: Vec<String>Execution path
step_count: usizeStep count
created_at: DateTime<Utc>Creation time
pending_action: Option<Value>Pending tool calls (if any)
interrupt_type: InterruptTypeInterrupt type
parent_checkpoint_id: Option<String>Parent checkpoint ID for lineage tracking.
None for the first checkpoint in a session.
label: Option<String>Human-readable label (e.g., “before risky operation”, “branch:feature-x”)
Tags for filtering and discovery
branch: Option<String>Branch name if this checkpoint is a fork
Implementations§
Source§impl Checkpoint
impl Checkpoint
Sourcepub fn new(
graph_name: String,
current_node: String,
state: &SharedState,
path: Vec<String>,
step_count: usize,
interrupt_type: InterruptType,
) -> Checkpoint
pub fn new( graph_name: String, current_node: String, state: &SharedState, path: Vec<String>, step_count: usize, interrupt_type: InterruptType, ) -> Checkpoint
Create a new Checkpoint
Sourcepub fn with_parent(
parent_id: impl Into<String>,
graph_name: String,
current_node: String,
state: &SharedState,
path: Vec<String>,
step_count: usize,
interrupt_type: InterruptType,
) -> Checkpoint
pub fn with_parent( parent_id: impl Into<String>, graph_name: String, current_node: String, state: &SharedState, path: Vec<String>, step_count: usize, interrupt_type: InterruptType, ) -> Checkpoint
Create a new Checkpoint with explicit parent for lineage tracking.
Sourcepub fn branch(
parent_id: impl Into<String>,
branch_name: impl Into<String>,
graph_name: String,
current_node: String,
state: &SharedState,
path: Vec<String>,
step_count: usize,
interrupt_type: InterruptType,
) -> Checkpoint
pub fn branch( parent_id: impl Into<String>, branch_name: impl Into<String>, graph_name: String, current_node: String, state: &SharedState, path: Vec<String>, step_count: usize, interrupt_type: InterruptType, ) -> Checkpoint
Create a new branch checkpoint (fork off an existing checkpoint).
Sourcepub fn with_label(self, label: impl Into<String>) -> Checkpoint
pub fn with_label(self, label: impl Into<String>) -> Checkpoint
Set a human-readable label on this checkpoint.
Add tags to this checkpoint.
Sourcepub fn restore_state(&self) -> Result<SharedState, ReactError>
pub fn restore_state(&self) -> Result<SharedState, ReactError>
Restore SharedState from a Checkpoint
Trait Implementations§
Source§impl Clone for Checkpoint
impl Clone for Checkpoint
Source§fn clone(&self) -> Checkpoint
fn clone(&self) -> Checkpoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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<Checkpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Checkpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl From<&Checkpoint> for CheckpointInfo
impl From<&Checkpoint> for CheckpointInfo
Source§fn from(cp: &Checkpoint) -> CheckpointInfo
fn from(cp: &Checkpoint) -> CheckpointInfo
Source§impl Serialize for Checkpoint
impl Serialize for Checkpoint
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request