pub struct ClaudeCodeLog {
pub cwd: String,
pub session_id: String,
pub log_type: String,
pub timestamp: String,
pub message: Option<ClaudeMessage>,
pub tool_use_result: Option<ClaudeToolUseResult>,
pub is_sidechain: bool,
}Expand description
Single log entry from a Claude Code session file.
Only fields the analyzer actually reads are materialised. Large unrelated
payloads — assistant text content, tool_result bodies, parentUuid,
version metadata — are dropped by serde during parse so they never retain
memory, which is what keeps long sessions from ballooning the working set.
Fields§
§cwd: StringWorking directory the session ran in.
session_id: StringSession identifier.
log_type: StringRecord type discriminator (e.g. user, assistant).
timestamp: StringISO-8601 timestamp string for the record.
message: Option<ClaudeMessage>The message body, when the record carries one.
tool_use_result: Option<ClaudeToolUseResult>Legacy top-level toolUseResult; absent on subagent records.
is_sidechain: booltrue for records inside a subagent JSONL
(<session>/subagents/agent-*.jsonl). Subagent records do not carry
the top-level toolUseResult field, so the analyzer falls back to
scanning message.content[].tool_result for them. Main-session
records (isSidechain == false or missing) skip the fallback to
avoid double-counting tool results that already arrived via
toolUseResult.
Trait Implementations§
Source§impl Clone for ClaudeCodeLog
impl Clone for ClaudeCodeLog
Source§fn clone(&self) -> ClaudeCodeLog
fn clone(&self) -> ClaudeCodeLog
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 ClaudeCodeLog
impl Debug for ClaudeCodeLog
Source§impl Default for ClaudeCodeLog
impl Default for ClaudeCodeLog
Source§fn default() -> ClaudeCodeLog
fn default() -> ClaudeCodeLog
Source§impl<'de> Deserialize<'de> for ClaudeCodeLog
impl<'de> Deserialize<'de> for ClaudeCodeLog
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 ClaudeCodeLog
impl RefUnwindSafe for ClaudeCodeLog
impl Send for ClaudeCodeLog
impl Sync for ClaudeCodeLog
impl Unpin for ClaudeCodeLog
impl UnsafeUnpin for ClaudeCodeLog
impl UnwindSafe for ClaudeCodeLog
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
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