pub struct ContextVersion {
pub version: u64,
pub turn: u64,
pub timestamp: u64,
pub messages: Vec<LlmMessage>,
pub summary: Option<String>,
}Expand description
A snapshot of messages captured at a point in time.
Created during compaction when messages are dropped from the active context. Each version records the version number, turn number, timestamp, the dropped LLM messages, and an optional summary.
Only LlmMessage variants are stored; CustomMessage values are filtered
out since they are not cloneable.
Fields§
§version: u64Monotonically increasing version number (starts at 1).
turn: u64Turn number when this version was created.
timestamp: u64Unix timestamp (seconds) when this version was created.
messages: Vec<LlmMessage>The LLM messages that were dropped during compaction.
summary: Option<String>Optional pre-computed summary of the dropped messages.
Trait Implementations§
Source§impl Clone for ContextVersion
impl Clone for ContextVersion
Source§fn clone(&self) -> ContextVersion
fn clone(&self) -> ContextVersion
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 moreAuto Trait Implementations§
impl Freeze for ContextVersion
impl RefUnwindSafe for ContextVersion
impl Send for ContextVersion
impl Sync for ContextVersion
impl Unpin for ContextVersion
impl UnsafeUnpin for ContextVersion
impl UnwindSafe for ContextVersion
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