pub struct AgentCheckpoint {
pub checkpoint_id: CheckpointId,
pub run_id: RunId,
pub conversation_id: ConversationId,
pub node: AgentExecutionNode,
pub run_step: usize,
pub resume: AgentResumeEvidence,
pub state: AgentRunState,
pub metadata: Map<String, Value>,
}Expand description
Serializable checkpoint emitted at a durable execution boundary.
Fields§
§checkpoint_id: CheckpointIdCheckpoint identifier.
run_id: RunIdRun identifier.
conversation_id: ConversationIdConversation identifier.
node: AgentExecutionNodeExecution boundary.
run_step: usizeCompleted run step at this boundary.
resume: AgentResumeEvidenceStable resume evidence for durable services.
state: AgentRunStateFull checkpointable run state.
metadata: Map<String, Value>Boundary metadata for node-specific details.
Implementations§
Source§impl AgentCheckpoint
impl AgentCheckpoint
Sourcepub fn new(node: AgentExecutionNode, state: &AgentRunState) -> AgentCheckpoint
pub fn new(node: AgentExecutionNode, state: &AgentRunState) -> AgentCheckpoint
Build a checkpoint from run state.
Sourcepub fn with_metadata(self, metadata: Map<String, Value>) -> AgentCheckpoint
pub fn with_metadata(self, metadata: Map<String, Value>) -> AgentCheckpoint
Attach checkpoint metadata.
Sourcepub fn with_stream_cursor(self, stream_cursor: usize) -> AgentCheckpoint
pub fn with_stream_cursor(self, stream_cursor: usize) -> AgentCheckpoint
Attach the last persisted stream cursor.
Trait Implementations§
Source§impl Clone for AgentCheckpoint
impl Clone for AgentCheckpoint
Source§fn clone(&self) -> AgentCheckpoint
fn clone(&self) -> AgentCheckpoint
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 AgentCheckpoint
impl Debug for AgentCheckpoint
Source§impl<'de> Deserialize<'de> for AgentCheckpoint
impl<'de> Deserialize<'de> for AgentCheckpoint
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentCheckpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentCheckpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AgentCheckpoint
Source§impl PartialEq for AgentCheckpoint
impl PartialEq for AgentCheckpoint
Source§impl Serialize for AgentCheckpoint
impl Serialize for AgentCheckpoint
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AgentCheckpoint
Source§impl VersionedRecord for AgentCheckpoint
impl VersionedRecord for AgentCheckpoint
Source§const ALLOW_BARE_V0: bool = true
const ALLOW_BARE_V0: bool = true
Whether this record explicitly accepts a previous bare-JSON v0 shape.
Source§fn decode_version(
version: u32,
payload: Value,
) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
fn decode_version(
version: u32,
payload: Value,
) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
Decode one enveloped payload version. Read more
Source§fn decode_bare_v0(payload: Value) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
fn decode_bare_v0(payload: Value) -> Result<Self, VersionedRecordError>where
Self: DeserializeOwned,
Decode the explicitly supported bare-JSON v0 shape. Read more
Auto Trait Implementations§
impl Freeze for AgentCheckpoint
impl RefUnwindSafe for AgentCheckpoint
impl Send for AgentCheckpoint
impl Sync for AgentCheckpoint
impl Unpin for AgentCheckpoint
impl UnsafeUnpin for AgentCheckpoint
impl UnwindSafe for AgentCheckpoint
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