pub struct CheckpointData {
pub messages: Vec<Message>,
pub context_variables: ContextVariables,
pub current_agent: String,
pub iteration: u32,
pub token_usage: TokenUsage,
}Expand description
The complete agent state captured at a loop boundary.
Fields§
§messages: Vec<Message>Full message history at the time of the checkpoint.
context_variables: ContextVariablesContext variables in effect at the time of the checkpoint.
current_agent: StringName of the active agent when the checkpoint was taken.
iteration: u32Zero-based iteration index of the loop at the checkpoint boundary.
token_usage: TokenUsageCumulative token usage up to the checkpoint.
Implementations§
Source§impl CheckpointData
impl CheckpointData
pub fn new( messages: Vec<Message>, context_variables: ContextVariables, current_agent: impl Into<String>, iteration: u32, token_usage: TokenUsage, ) -> Self
Trait Implementations§
Source§impl Clone for CheckpointData
impl Clone for CheckpointData
Source§fn clone(&self) -> CheckpointData
fn clone(&self) -> CheckpointData
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 CheckpointData
impl Debug for CheckpointData
Source§impl<'de> Deserialize<'de> for CheckpointData
impl<'de> Deserialize<'de> for CheckpointData
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 CheckpointData
impl RefUnwindSafe for CheckpointData
impl Send for CheckpointData
impl Sync for CheckpointData
impl Unpin for CheckpointData
impl UnsafeUnpin for CheckpointData
impl UnwindSafe for CheckpointData
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