pub struct AcpSessionStore { /* private fields */ }Implementations§
Source§impl AcpSessionStore
impl AcpSessionStore
pub fn new(workspace_dir: &Path) -> Result<Self>
Sourcepub fn create_session(
&self,
session_id: &str,
workspace_dir: &str,
) -> Result<()>
pub fn create_session( &self, session_id: &str, workspace_dir: &str, ) -> Result<()>
Record a new session. Call immediately after session/new succeeds.
Sourcepub fn load_session(&self, session_id: &str) -> Result<Option<AcpSessionData>>
pub fn load_session(&self, session_id: &str) -> Result<Option<AcpSessionData>>
Load session metadata and full message history for restore.
Returns None if the session_id is not found.
Sourcepub fn append_turn(
&self,
session_id: &str,
messages: &[ConversationMessage],
) -> Result<()>
pub fn append_turn( &self, session_id: &str, messages: &[ConversationMessage], ) -> Result<()>
Append all ConversationMessages from one completed turn.
Single transaction: N message INSERTs + last_activity UPDATE.
Returns early without writing if messages is empty.
Sourcepub fn delete_session(&self, session_id: &str) -> Result<bool>
pub fn delete_session(&self, session_id: &str) -> Result<bool>
Delete a session and all its messages. Returns true if the session existed.
Intended for operator tooling — not triggered by session/close.
Sourcepub fn touch_session(&self, session_id: &str) -> Result<()>
pub fn touch_session(&self, session_id: &str) -> Result<()>
Update last_activity without appending messages.
Auto Trait Implementations§
impl !Freeze for AcpSessionStore
impl !RefUnwindSafe for AcpSessionStore
impl Send for AcpSessionStore
impl Sync for AcpSessionStore
impl Unpin for AcpSessionStore
impl UnsafeUnpin for AcpSessionStore
impl !UnwindSafe for AcpSessionStore
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