pub struct BounceTracker { /* private fields */ }Implementations§
Source§impl BounceTracker
impl BounceTracker
pub fn new() -> Self
pub fn next_seq(&mut self) -> u64
pub fn set_seq(&mut self, seq: u64)
pub fn record_read( &mut self, path: &str, mode: &str, tokens_sent: usize, original_tokens: usize, )
pub fn record_shell_file_access(&mut self, path: &str)
pub fn record_edit(&mut self, path: &str)
pub fn should_force_full(&self, path: &str) -> bool
pub fn bounce_rate_for_extension(&self, path: &str) -> Option<f64>
pub fn total_bounces(&self) -> u64
pub fn total_wasted_tokens(&self) -> usize
pub fn adjusted_savings(&self, raw_savings: usize) -> isize
pub fn per_extension_json(&self) -> Vec<Value>
pub fn format_summary(&self) -> String
Trait Implementations§
Source§impl Debug for BounceTracker
impl Debug for BounceTracker
Source§impl Default for BounceTracker
impl Default for BounceTracker
Source§fn default() -> BounceTracker
fn default() -> BounceTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BounceTracker
impl RefUnwindSafe for BounceTracker
impl Send for BounceTracker
impl Sync for BounceTracker
impl Unpin for BounceTracker
impl UnsafeUnpin for BounceTracker
impl UnwindSafe for BounceTracker
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