pub struct SessionStore { /* private fields */ }Expand description
A filesystem session store rooted at a directory.
Implementations§
Source§impl SessionStore
impl SessionStore
Sourcepub fn open(root: impl Into<PathBuf>) -> Result<Self>
pub fn open(root: impl Into<PathBuf>) -> Result<Self>
Open (creating if needed) a store at root.
Sourcepub fn save(
&self,
name: &str,
title: &str,
transcript_jsonl: &str,
) -> Result<()>
pub fn save( &self, name: &str, title: &str, transcript_jsonl: &str, ) -> Result<()>
Save (or overwrite) a session’s transcript JSONL and title.
Sourcepub fn load(&self, name: &str) -> Result<String>
pub fn load(&self, name: &str) -> Result<String>
Read a session’s transcript JSONL (active or archived).
Sourcepub fn list(&self) -> Vec<SessionInfo>
pub fn list(&self) -> Vec<SessionInfo>
List all sessions (active and archived).
Sourcepub fn delete(&self, name: &str) -> Result<()>
pub fn delete(&self, name: &str) -> Result<()>
Permanently delete a session (active or archived).
Auto Trait Implementations§
impl Freeze for SessionStore
impl RefUnwindSafe for SessionStore
impl Send for SessionStore
impl Sync for SessionStore
impl Unpin for SessionStore
impl UnsafeUnpin for SessionStore
impl UnwindSafe for SessionStore
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