pub struct TokenUsage {
pub input_tokens: u32,
pub output_tokens: u32,
pub total_tokens: u32,
pub cache_read_input_tokens: u32,
pub cache_write_input_tokens: u32,
}Fields§
§input_tokens: u32§output_tokens: u32§total_tokens: u32§cache_read_input_tokens: u32Prompt tokens served from the provider’s prompt cache (Bedrock name).
cache_write_input_tokens: u32Prompt tokens written to the provider’s prompt cache (Bedrock name).
Trait Implementations§
Source§impl Clone for TokenUsage
impl Clone for TokenUsage
Source§fn clone(&self) -> TokenUsage
fn clone(&self) -> TokenUsage
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 moreAuto Trait Implementations§
impl Freeze for TokenUsage
impl RefUnwindSafe for TokenUsage
impl Send for TokenUsage
impl Sync for TokenUsage
impl Unpin for TokenUsage
impl UnsafeUnpin for TokenUsage
impl UnwindSafe for TokenUsage
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