pub struct SessionTrace {
pub records: Vec<TraceRecord>,
}Expand description
A complete recorded session trace.
Fields§
§records: Vec<TraceRecord>Implementations§
Source§impl SessionTrace
impl SessionTrace
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Number of frame checkpoints in the trace.
Sourcepub fn final_checksum_chain(&self) -> Option<u64>
pub fn final_checksum_chain(&self) -> Option<u64>
Extract the final checksum chain from the summary record.
Sourcepub fn validate(&self) -> Result<(), TraceValidationError>
pub fn validate(&self) -> Result<(), TraceValidationError>
Validate structural invariants for a recorded trace.
This checks:
- header exists and is the first record
- summary exists and is the last record
- frame indices are contiguous and start at zero
- summary totals/chains match frame records
Source§impl SessionTrace
impl SessionTrace
Sourcepub fn from_jsonl(input: &str) -> Result<Self, TraceParseError>
pub fn from_jsonl(input: &str) -> Result<Self, TraceParseError>
Parse a golden-trace-v1 JSONL string into a SessionTrace.
Returns a parse error with the line number on failure.
Sourcepub fn from_jsonl_validated(input: &str) -> Result<Self, TraceLoadError>
pub fn from_jsonl_validated(input: &str) -> Result<Self, TraceLoadError>
Parse and validate a golden-trace-v1 JSONL payload.
Trait Implementations§
Source§impl Clone for SessionTrace
impl Clone for SessionTrace
Source§fn clone(&self) -> SessionTrace
fn clone(&self) -> SessionTrace
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SessionTrace
impl RefUnwindSafe for SessionTrace
impl Send for SessionTrace
impl Sync for SessionTrace
impl Unpin for SessionTrace
impl UnwindSafe for SessionTrace
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