pub struct JsonlSessionStore;Expand description
JSONL-based session store implementation.
This is the default store, preserving backward compatibility with
existing .jsonl session files.
Trait Implementations§
Source§impl Clone for JsonlSessionStore
impl Clone for JsonlSessionStore
Source§fn clone(&self) -> JsonlSessionStore
fn clone(&self) -> JsonlSessionStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JsonlSessionStore
Source§impl Debug for JsonlSessionStore
impl Debug for JsonlSessionStore
Source§impl Default for JsonlSessionStore
impl Default for JsonlSessionStore
Source§fn default() -> JsonlSessionStore
fn default() -> JsonlSessionStore
Returns the “default value” for a type. Read more
Source§impl SessionStore for JsonlSessionStore
impl SessionStore for JsonlSessionStore
Source§fn read_entries(
&self,
file_path: &Path,
) -> Result<Vec<SessionEntry>, SessionError>
fn read_entries( &self, file_path: &Path, ) -> Result<Vec<SessionEntry>, SessionError>
Read all entries from a session file.
Source§fn append_entry(
&self,
file_path: &Path,
entry: &SessionEntry,
) -> Result<(), SessionError>
fn append_entry( &self, file_path: &Path, entry: &SessionEntry, ) -> Result<(), SessionError>
Append a single entry to a session file.
Source§fn replace_entries_atomically(
&self,
file_path: &Path,
entries: &[SessionEntry],
) -> Result<(), SessionError>
fn replace_entries_atomically( &self, file_path: &Path, entries: &[SessionEntry], ) -> Result<(), SessionError>
Replace a complete log using a temporary sibling file and atomic rename. Read more
Source§fn read_last_entry_id(&self, file_path: &Path) -> Option<String>
fn read_last_entry_id(&self, file_path: &Path) -> Option<String>
Read the ID of the last entry in the file.
Source§fn scan_file(&self, file_path: &Path) -> Result<SessionInfo, SessionError>
fn scan_file(&self, file_path: &Path) -> Result<SessionInfo, SessionError>
Scan a session file for message count and last preview text.
Source§fn read_bytes(&self, file_path: &Path) -> Result<Vec<u8>, SessionError>
fn read_bytes(&self, file_path: &Path) -> Result<Vec<u8>, SessionError>
Read the session file as raw bytes.
Source§fn file_extension(&self) -> &'static str
fn file_extension(&self) -> &'static str
The file extension for this store’s format (e.g.,
"jsonl").Auto Trait Implementations§
impl Freeze for JsonlSessionStore
impl RefUnwindSafe for JsonlSessionStore
impl Send for JsonlSessionStore
impl Sync for JsonlSessionStore
impl Unpin for JsonlSessionStore
impl UnsafeUnpin for JsonlSessionStore
impl UnwindSafe for JsonlSessionStore
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