pub struct Conversation {
pub id: u64,
pub history: Vec<HistoryEntry>,
pub title: String,
pub uptime_secs: u64,
pub created_at: Instant,
pub handle: Option<ConversationHandle>,
pub topic: Option<String>,
}Expand description
A conversation tied to a specific agent.
Pure working-context container. Persistence is delegated to the Storage trait via the session handle.
Fields§
§id: u64Unique conversation identifier (monotonic counter, runtime-only).
history: Vec<HistoryEntry>Conversation history (the working context for the LLM).
title: StringConversation title (set by the set_title tool).
uptime_secs: u64Accumulated active time in seconds.
created_at: InstantWhen this conversation was loaded/created in this process.
handle: Option<ConversationHandle>Persistent conversation identity, assigned by the storage layer.
None until the first persistence call — and remains None for
tmp chats that never enter a topic.
topic: Option<String>Topic this conversation belongs to, if any. None = tmp chat
(no storage, no resume). Set by switch_topic.
Implementations§
Source§impl Conversation
impl Conversation
Sourcepub fn meta(&self, agent: &str, created_by: &str) -> ConversationMeta
pub fn meta(&self, agent: &str, created_by: &str) -> ConversationMeta
Build a ConversationMeta snapshot from this conversation’s
current state.
Trait Implementations§
Source§impl Clone for Conversation
impl Clone for Conversation
Source§fn clone(&self) -> Conversation
fn clone(&self) -> Conversation
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 Conversation
impl RefUnwindSafe for Conversation
impl Send for Conversation
impl Sync for Conversation
impl Unpin for Conversation
impl UnsafeUnpin for Conversation
impl UnwindSafe for Conversation
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