Struct RecordingObserver
pub struct RecordingObserver { /* private fields */ }Expand description
Captures (tool_name, success) for each dispatched tool call and accumulates
reported token usage across the run.
Implementations§
Source§impl RecordingObserver
impl RecordingObserver
pub fn new() -> Self
Sourcepub fn tool_names(&self) -> Vec<String>
pub fn tool_names(&self) -> Vec<String>
Names of tools that were dispatched, in call order.
Sourcepub fn all_tools_succeeded(&self) -> bool
pub fn all_tools_succeeded(&self) -> bool
True when every dispatched tool call reported success (vacuously true if none).
Trait Implementations§
Source§impl Default for RecordingObserver
impl Default for RecordingObserver
Source§fn default() -> RecordingObserver
fn default() -> RecordingObserver
Returns the “default value” for a type. Read more
Source§impl Observer for RecordingObserver
impl Observer for RecordingObserver
Source§fn record_event(&self, event: &ObserverEvent)
fn record_event(&self, event: &ObserverEvent)
Record a discrete lifecycle event. Read more
Source§fn record_metric(&self, _metric: &ObserverMetric)
fn record_metric(&self, _metric: &ObserverMetric)
Record a numeric metric sample. Read more
Auto Trait Implementations§
impl !Freeze for RecordingObserver
impl RefUnwindSafe for RecordingObserver
impl Send for RecordingObserver
impl Sync for RecordingObserver
impl Unpin for RecordingObserver
impl UnsafeUnpin for RecordingObserver
impl UnwindSafe for RecordingObserver
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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