pub enum WriterItem<'a> {
Row(RowValue<'a>),
Usage {
agent_instance_hierarchy: &'a str,
total_tokens: u64,
},
Error {
agent_instance_hierarchy: &'a str,
response_id: &'a str,
error: &'a ResponseError,
},
}Expand description
One item from a top-level chunk walk: either a streaming-content
RowValue or a per-AIH agent-completion token-usage snapshot.
Usage rides the SAME single traversal as the content rows — the
walk already descends into every nested agent completion, so the
writer never re-walks the chunk tree for usage.
Variants§
Row(RowValue<'a>)
Usage
Error
An in-band completion error: the agent completion ITSELF
carries error (an upstream/API failure delivered as part of
the response, not a transport failure). The writer persists it
as an error log row — once per (aih, response_id); the
cumulative accumulator re-yields it every tick.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WriterItem<'a>
impl<'a> RefUnwindSafe for WriterItem<'a>
impl<'a> Send for WriterItem<'a>
impl<'a> Sync for WriterItem<'a>
impl<'a> Unpin for WriterItem<'a>
impl<'a> UnsafeUnpin for WriterItem<'a>
impl<'a> UnwindSafe for WriterItem<'a>
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
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>
Converts
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>
Converts
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