pub struct SessionEventLog { /* private fields */ }Expand description
Canonical append-only event log for a single session.
All session history is reconstructable from this log. Live conversation state is never read back into context from here; the log is only consumed for revert, compaction, analytics, and long-term-learning queries.
Implementations§
Source§impl SessionEventLog
impl SessionEventLog
Sourcepub fn append(&self, event: &ThreadEvent) -> Result<(), SessionStoreError>
pub fn append(&self, event: &ThreadEvent) -> Result<(), SessionStoreError>
Append an event to the log and update the in-memory index/manifest.
Sourcepub fn event_count(&self) -> u64
pub fn event_count(&self) -> u64
Number of events recorded.
Sourcepub fn flush(&self) -> Result<(), SessionStoreError>
pub fn flush(&self) -> Result<(), SessionStoreError>
Flush pending event bytes and metadata to the session store.
Sourcepub fn manifest(&self) -> SessionManifest
pub fn manifest(&self) -> SessionManifest
Snapshot of the session manifest.
Sourcepub fn turn_index(&self) -> TurnIndex
pub fn turn_index(&self) -> TurnIndex
Snapshot of the turn index.
Trait Implementations§
Source§impl Drop for SessionEventLog
impl Drop for SessionEventLog
Auto Trait Implementations§
impl !Freeze for SessionEventLog
impl RefUnwindSafe for SessionEventLog
impl Send for SessionEventLog
impl Sync for SessionEventLog
impl Unpin for SessionEventLog
impl UnsafeUnpin for SessionEventLog
impl UnwindSafe for SessionEventLog
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