pub struct TokenCount {
pub tokens: u64,
pub source: TokenSource,
}Expand description
Accumulated token count with provenance.
Tracks both the total token count and the weakest TokenSource
across all accumulated calls. This lets consumers (e.g. alc_eval_compare)
know whether a comparison is between precise or estimated values.
Fields§
§tokens: u64§source: TokenSourceTrait Implementations§
Source§impl Clone for TokenCount
impl Clone for TokenCount
Source§fn clone(&self) -> TokenCount
fn clone(&self) -> TokenCount
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TokenCount
impl RefUnwindSafe for TokenCount
impl Send for TokenCount
impl Sync for TokenCount
impl Unpin for TokenCount
impl UnsafeUnpin for TokenCount
impl UnwindSafe for TokenCount
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