pub struct EffectTracker { /* private fields */ }Expand description
Tracks tool effects during execution.
Implementations§
Source§impl EffectTracker
impl EffectTracker
pub fn new() -> Self
Sourcepub fn record(
&mut self,
tool_name: &str,
step_name: &str,
unit_name: &str,
effects: &[String],
)
pub fn record( &mut self, tool_name: &str, step_name: &str, unit_name: &str, effects: &[String], )
Record a tool execution with its declared effects.
Sourcepub fn records(&self) -> &[EffectRecord]
pub fn records(&self) -> &[EffectRecord]
All recorded effect events.
Sourcepub fn total_executions(&self) -> usize
pub fn total_executions(&self) -> usize
Total number of tool executions tracked.
Sourcepub fn effect_count(&self, effect: &str) -> usize
pub fn effect_count(&self, effect: &str) -> usize
Count of a specific effect type across all executions.
Sourcepub fn distinct_effects(&self) -> Vec<&str>
pub fn distinct_effects(&self) -> Vec<&str>
All distinct effect types observed.
Sourcepub fn has_network_effects(&self) -> bool
pub fn has_network_effects(&self) -> bool
Whether any network effects have been recorded.
Sourcepub fn has_write_effects(&self) -> bool
pub fn has_write_effects(&self) -> bool
Whether any write effects have been recorded.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EffectTracker
impl RefUnwindSafe for EffectTracker
impl Send for EffectTracker
impl Sync for EffectTracker
impl Unpin for EffectTracker
impl UnsafeUnpin for EffectTracker
impl UnwindSafe for EffectTracker
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 moreCreates a shared type from an unshared type.