pub struct TokenCounts { /* private fields */ }Expand description
Per-category token counts aggregated from the transcript.
§Invariants
- All mutations go through
Self::accumulateso additions saturate atu64::MAXrather than wrapping. Fields arepub(crate)so in-crate code can read them; writes are funnelled through the one private path that preserves the saturating discipline. External crates read viaSelf::total/Self::input/Self::output/Self::cache_creation/Self::cache_read.
Implementations§
Source§impl TokenCounts
impl TokenCounts
Trait Implementations§
Source§impl Clone for TokenCounts
impl Clone for TokenCounts
Source§fn clone(&self) -> TokenCounts
fn clone(&self) -> TokenCounts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenCounts
impl Debug for TokenCounts
Source§impl Default for TokenCounts
impl Default for TokenCounts
Source§fn default() -> TokenCounts
fn default() -> TokenCounts
Returns the “default value” for a type. Read more
Source§impl PartialEq for TokenCounts
impl PartialEq for TokenCounts
Source§fn eq(&self, other: &TokenCounts) -> bool
fn eq(&self, other: &TokenCounts) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TokenCounts
impl Eq for TokenCounts
impl StructuralPartialEq for TokenCounts
Auto Trait Implementations§
impl Freeze for TokenCounts
impl RefUnwindSafe for TokenCounts
impl Send for TokenCounts
impl Sync for TokenCounts
impl Unpin for TokenCounts
impl UnsafeUnpin for TokenCounts
impl UnwindSafe for TokenCounts
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.