pub struct Checkpoint {
pub v: i32,
pub id: String,
pub ts: String,
pub channel_values: HashMap<String, Value>,
pub channel_versions: HashMap<String, i32>,
pub versions_seen: HashMap<String, HashMap<String, i32>>,
pub thread_id: Option<String>,
pub parent_id: Option<String>,
}Expand description
A checkpoint representing the state of a graph at a point in time.
Checkpoints are compatible with the Python LangGraph wire format, allowing interoperability between Rust and Python implementations.
Fields§
§v: i32Checkpoint format version
id: StringUnique checkpoint identifier
ts: StringTimestamp when checkpoint was created
channel_values: HashMap<String, Value>The values of all channels at this checkpoint
channel_versions: HashMap<String, i32>Version numbers for each channel
versions_seen: HashMap<String, HashMap<String, i32>>Versions seen by each channel (for tracking updates)
thread_id: Option<String>Thread ID this checkpoint belongs to
parent_id: Option<String>Parent checkpoint ID (for nested graphs/subgraphs)
Implementations§
Source§impl Checkpoint
impl Checkpoint
Sourcepub fn with_thread_id(self, thread_id: impl Into<String>) -> Self
pub fn with_thread_id(self, thread_id: impl Into<String>) -> Self
Create a checkpoint with a specific thread ID
Sourcepub fn set_channel(&mut self, name: impl Into<String>, value: Value)
pub fn set_channel(&mut self, name: impl Into<String>, value: Value)
Set a channel value
Sourcepub fn get_channel(&self, name: &str) -> Option<&Value>
pub fn get_channel(&self, name: &str) -> Option<&Value>
Get a channel value
Trait Implementations§
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 · 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 Default for Checkpoint
impl Default 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