pub trait ConversationStateAccess {
// Required methods
fn messages(&self) -> &[Message];
fn messages_mut(&mut self) -> &mut Vec<Message>;
fn system_prompt(&self) -> &str;
}Expand description
Trait for conversation state that memory management can operate on.
This decouples the memory module from any specific agent state representation.
The agent’s ConversationState (e.g., in src/agent/state.rs) implements this trait.
Required Methods§
Sourcefn messages_mut(&mut self) -> &mut Vec<Message>
fn messages_mut(&mut self) -> &mut Vec<Message>
Returns a mutable reference to the messages vector for in-place compaction.
Sourcefn system_prompt(&self) -> &str
fn system_prompt(&self) -> &str
Returns the system prompt string (first system message content).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".