pub struct TokenUsageSummary {
pub total_input_tokens: u64,
pub total_output_tokens: u64,
pub total_requests: usize,
pub total_cache_creation_tokens: u64,
pub total_cache_read_tokens: u64,
}Expand description
Overall token usage summary
Fields§
§total_input_tokens: u64Total input tokens across all requests
total_output_tokens: u64Total output tokens across all requests
total_requests: usizeTotal number of GenAI requests
total_cache_creation_tokens: u64Total cache creation input tokens (Anthropic prompt caching)
total_cache_read_tokens: u64Total cache read input tokens (Anthropic prompt caching)
Trait Implementations§
Source§impl Clone for TokenUsageSummary
impl Clone for TokenUsageSummary
Source§fn clone(&self) -> TokenUsageSummary
fn clone(&self) -> TokenUsageSummary
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 TokenUsageSummary
impl Debug for TokenUsageSummary
Source§impl<'de> Deserialize<'de> for TokenUsageSummary
impl<'de> Deserialize<'de> for TokenUsageSummary
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TokenUsageSummary
impl RefUnwindSafe for TokenUsageSummary
impl Send for TokenUsageSummary
impl Sync for TokenUsageSummary
impl Unpin for TokenUsageSummary
impl UnsafeUnpin for TokenUsageSummary
impl UnwindSafe for TokenUsageSummary
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