struct TurnTrace {
opened: Option<String>,
ended: Option<String>,
stopped: Option<StopReason>,
worked: bool,
}Expand description
The facts a turn’s own rows carry, gathered while the fold walks them.
A transcript holds no result frame, so a turn read from one has no name of its own unless one is derived here: the CLI writes that frame to the wire and not to the file.
Fields§
§opened: Option<String>The first and last clocks the turn’s rows carried.
ended: Option<String>§stopped: Option<StopReason>The stop the turn’s last assistant frame reported. A frame handing back for a tool call has not ended a turn.
worked: boolWhether the turn wrote an assistant frame at all: a prompt nothing answered draws no row, the way a view draws none.
Implementations§
Source§impl TurnTrace
impl TurnTrace
fn watch(&mut self, message: &Message)
fn clock(&mut self, at: Option<&str>)
Sourcefn span_ms(&self) -> Option<u64>
fn span_ms(&self) -> Option<u64>
The span the turn’s own rows support: None when either end does not
parse or the pair runs backwards, which a transcript does hand back -
a replayed row carries the stamp it was written with, so it can sit
behind the row before it. The header prints a span and nothing else
where one belongs, so a turn with no usable span draws no row: a zero
there would be a measurement this row does not have.
Sourcefn stopped_of_its_own_accord(&self) -> bool
fn stopped_of_its_own_accord(&self) -> bool
Whether the turn’s own last frame ended it rather than handing back for a tool call. Only a turn closing at the end of a conversation needs this: a turn the next prompt closed is over whatever its last frame stopped for.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TurnTrace
impl RefUnwindSafe for TurnTrace
impl Send for TurnTrace
impl Sync for TurnTrace
impl Unpin for TurnTrace
impl UnsafeUnpin for TurnTrace
impl UnwindSafe for TurnTrace
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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