pub trait ConversationState: Send {
// Required methods
fn messages(&self) -> &[Message];
fn append(&mut self, message: Message);
fn replace(&mut self, messages: Vec<Message>);
// Provided method
fn token_estimate(&self) -> u64 { ... }
}Expand description
Mutable conversation backing a turn or session.
Required Methods§
Provided Methods§
Sourcefn token_estimate(&self) -> u64
fn token_estimate(&self) -> u64
Token estimate for compaction triggers (aligned with preflight, W3.2).
Includes framing, multimodal parts, and tool-call argument JSON.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".