pub struct Usage {
pub input_tokens: u32,
pub output_tokens: u32,
pub cache_creation_input_tokens: Option<u32>,
pub cache_read_input_tokens: Option<u32>,
pub cache_creation: Option<CacheCreation>,
pub server_tool_use: Option<ServerToolUsage>,
pub service_tier: Option<String>,
}Expand description
Billing and rate-limit usage
Fields§
§input_tokens: u32The number of input tokens used
output_tokens: u32The number of output tokens used
cache_creation_input_tokens: Option<u32>The number of input tokens used to create the cache entry
cache_read_input_tokens: Option<u32>The number of input tokens read from the cache
cache_creation: Option<CacheCreation>Breakdown of cached tokens by TTL
server_tool_use: Option<ServerToolUsage>Server tool usage information
service_tier: Option<String>Service tier used for the request
Trait Implementations§
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
Auto Trait Implementations§
impl Freeze for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin 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