#[non_exhaustive]pub struct UsageSummary {
pub input_tokens: u64,
pub output_tokens: u64,
pub cache_read_input_tokens: Option<u64>,
pub cache_creation_input_tokens: Option<u64>,
pub cache_creation: Option<Value>,
}Expand description
Token usage breakdown. Source: chunk-20bv8pca.js:11526–11530
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.input_tokens: u64Input tokens.
output_tokens: u64Output tokens.
cache_read_input_tokens: Option<u64>Input tokens read from the prompt cache.
cache_creation_input_tokens: Option<u64>Input tokens written to the prompt cache.
cache_creation: Option<Value>Cache writes by TTL, kept verbatim.
Trait Implementations§
Source§impl Clone for UsageSummary
impl Clone for UsageSummary
Source§impl Debug for UsageSummary
impl Debug for UsageSummary
Source§impl Default for UsageSummary
impl Default for UsageSummary
Source§impl<'de> Deserialize<'de> for UsageSummary
impl<'de> Deserialize<'de> for UsageSummary
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 Forget for UsageSummary
impl Freeze for UsageSummary
impl Move for UsageSummary
impl RefUnwindSafe for UsageSummary
impl Send for UsageSummary
impl Sync for UsageSummary
impl Unpin for UsageSummary
impl UnsafeUnpin for UsageSummary
impl UnwindSafe for UsageSummary
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