pub struct UsageTotals {
pub input: u64,
pub output: u64,
pub cache_read: u64,
pub cache_write: u64,
pub cost: f64,
pub cache_hit_rate: Option<f64>,
}Expand description
Session-wide token and cost totals.
Fields§
§input: u64Input tokens.
output: u64Output tokens.
cache_read: u64Cache read tokens.
cache_write: u64Cache write tokens.
cost: f64Cost in US dollars.
cache_hit_rate: Option<f64>Cache hit rate of the latest assistant message, in percent.
Trait Implementations§
Source§impl Clone for UsageTotals
impl Clone for UsageTotals
impl Copy for UsageTotals
Source§impl Debug for UsageTotals
impl Debug for UsageTotals
Source§impl Default for UsageTotals
impl Default for UsageTotals
Source§impl PartialEq for UsageTotals
impl PartialEq for UsageTotals
impl StructuralPartialEq for UsageTotals
Auto Trait Implementations§
impl Forget for UsageTotals
impl Freeze for UsageTotals
impl RefUnwindSafe for UsageTotals
impl Send for UsageTotals
impl Sync for UsageTotals
impl Unpin for UsageTotals
impl UnsafeUnpin for UsageTotals
impl UnwindSafe for UsageTotals
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