pub struct CompactTextSessionStore;Expand description
Compact text session store implementation.
Uses TSV header fields + length-prefixed content for ~40-65% size reduction over JSONL while remaining text-readable. See ADR-037.
Trait Implementations§
Source§impl Clone for CompactTextSessionStore
impl Clone for CompactTextSessionStore
Source§fn clone(&self) -> CompactTextSessionStore
fn clone(&self) -> CompactTextSessionStore
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 CompactTextSessionStore
Source§impl Debug for CompactTextSessionStore
impl Debug for CompactTextSessionStore
Source§impl Default for CompactTextSessionStore
impl Default for CompactTextSessionStore
Source§fn default() -> CompactTextSessionStore
fn default() -> CompactTextSessionStore
Returns the “default value” for a type. Read more
Source§impl SessionStore for CompactTextSessionStore
impl SessionStore for CompactTextSessionStore
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 CompactTextSessionStore
impl RefUnwindSafe for CompactTextSessionStore
impl Send for CompactTextSessionStore
impl Sync for CompactTextSessionStore
impl Unpin for CompactTextSessionStore
impl UnsafeUnpin for CompactTextSessionStore
impl UnwindSafe for CompactTextSessionStore
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