pub struct Conversation {
pub path: PathBuf,
/* private fields */
}Expand description
A saved conversation, read whole.
Fields§
§path: PathBufImplementations§
Source§impl Conversation
impl Conversation
Sourcepub fn load(path: &Path) -> Result<Option<Self>, String>
pub fn load(path: &Path) -> Result<Option<Self>, String>
Read a session file; None when it does not exist. A last line cut short by a crash
is left out.
Sourcepub fn history(&self) -> Result<Vec<Message>, String>
pub fn history(&self) -> Result<Vec<Message>, String>
Every message in order, the review’s and its follow-ups’, ready to send again. Tool
calls anywhere in the history whose turn stopped before answering get an error result
right after that assistant message, so switching from a stopped legacy turn to ACP and
later back to Direct API never sends unanswered ToolCalls to Anthropic/OpenAI.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Conversation
impl Freeze for Conversation
impl Move 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