pub struct SessionJournalSnapshot {
pub session_id: String,
pub entry_count: usize,
pub head_hash: String,
pub data_flow: CumulativeDataFlow,
pub tool_sequence: Vec<String>,
pub tool_counts: HashMap<String, u64>,
pub current_streak_tool: Option<String>,
pub current_streak_len: u64,
}Expand description
Immutable guard-read snapshot captured under one journal lock.
Fields§
§session_id: StringSession identifier for the journal that produced this snapshot.
entry_count: usizeNumber of entries present when the snapshot was captured.
head_hash: StringHash of the most recent entry, or the zero hash for an empty journal.
data_flow: CumulativeDataFlowCumulative data flow state.
tool_sequence: Vec<String>Ordered tool invocation sequence.
tool_counts: HashMap<String, u64>Per-tool invocation counts.
current_streak_tool: Option<String>The tool name of the current consecutive run (the last tool recorded), or
None if nothing has been recorded. Cumulative and O(1): it survives ring
eviction so a same-tool streak longer than journal_entry_cap is still
counted in full.
current_streak_len: u64Length of the current consecutive run of current_streak_tool. Resets to
1 whenever a different tool is recorded, so it stays bounded semantically
(a single running count, not a growing collection).
Trait Implementations§
Source§impl Clone for SessionJournalSnapshot
impl Clone for SessionJournalSnapshot
Source§fn clone(&self) -> SessionJournalSnapshot
fn clone(&self) -> SessionJournalSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionJournalSnapshot
impl Debug for SessionJournalSnapshot
Source§impl<'de> Deserialize<'de> for SessionJournalSnapshot
impl<'de> Deserialize<'de> for SessionJournalSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SessionJournalSnapshot
impl RefUnwindSafe for SessionJournalSnapshot
impl Send for SessionJournalSnapshot
impl Sync for SessionJournalSnapshot
impl Unpin for SessionJournalSnapshot
impl UnsafeUnpin for SessionJournalSnapshot
impl UnwindSafe for SessionJournalSnapshot
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more