#[non_exhaustive]pub struct Usage {
pub cached_tokens_by_modality: Option<Vec<ModalityTokens>>,
pub grounding_tool_count: Option<Vec<GroundingToolCount>>,
pub input_tokens_by_modality: Option<Vec<ModalityTokens>>,
pub output_tokens_by_modality: Option<Vec<ModalityTokens>>,
pub tool_use_tokens_by_modality: Option<Vec<ModalityTokens>>,
pub total_cached_tokens: Option<i64>,
pub total_input_tokens: Option<i64>,
pub total_output_tokens: Option<i64>,
pub total_thought_tokens: Option<i64>,
pub total_tokens: Option<i64>,
pub total_tool_use_tokens: Option<i64>,
pub rest: Rest,
}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.cached_tokens_by_modality: Option<Vec<ModalityTokens>>§grounding_tool_count: Option<Vec<GroundingToolCount>>§input_tokens_by_modality: Option<Vec<ModalityTokens>>§output_tokens_by_modality: Option<Vec<ModalityTokens>>§tool_use_tokens_by_modality: Option<Vec<ModalityTokens>>§total_cached_tokens: Option<i64>§total_input_tokens: Option<i64>§total_output_tokens: Option<i64>§total_thought_tokens: Option<i64>§total_tokens: Option<i64>§total_tool_use_tokens: Option<i64>§rest: RestImplementations§
Trait Implementations§
Source§impl DeclaredFields for Usage
impl DeclaredFields for Usage
fn into_declared(self) -> Self
Source§impl<'de> Deserialize<'de> for Usage
impl<'de> Deserialize<'de> for Usage
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
impl StructuralPartialEq for Usage
Auto Trait Implementations§
impl Freeze for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnsafeUnpin for Usage
impl UnwindSafe for Usage
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