pub struct Conversation {
pub session_id: String,
pub project_path: Option<String>,
pub entries: Vec<ConversationEntry>,
pub started_at: Option<DateTime<Utc>>,
pub last_activity: Option<DateTime<Utc>>,
}Fields§
§session_id: String§project_path: Option<String>§entries: Vec<ConversationEntry>§started_at: Option<DateTime<Utc>>§last_activity: Option<DateTime<Utc>>Implementations§
Source§impl Conversation
impl Conversation
pub fn new(session_id: String) -> Self
pub fn add_entry(&mut self, entry: ConversationEntry)
pub fn user_messages(&self) -> Vec<&ConversationEntry>
pub fn assistant_messages(&self) -> Vec<&ConversationEntry>
pub fn tool_uses(&self) -> Vec<(&ConversationEntry, &ContentPart)>
pub fn message_count(&self) -> usize
pub fn duration(&self) -> Option<Duration>
Sourcepub fn entries_since(&self, since_uuid: &str) -> Vec<ConversationEntry>
pub fn entries_since(&self, since_uuid: &str) -> Vec<ConversationEntry>
Returns entries after the given UUID. If the UUID is not found, returns all entries (for full sync). If the UUID is the last entry, returns an empty vec.
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 moreSource§impl Debug for Conversation
impl Debug for Conversation
Source§impl<'de> Deserialize<'de> for Conversation
impl<'de> Deserialize<'de> for Conversation
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 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