pub struct SessionUsage {
pub prompt_tokens: i64,
pub completion_tokens: i64,
pub cache_read_tokens: i64,
pub cache_creation_tokens: i64,
pub thinking_tokens: i64,
pub api_calls: i64,
}Expand description
Token usage totals for a session.
Fields§
§prompt_tokens: i64Total input tokens.
completion_tokens: i64Total output tokens.
cache_read_tokens: i64Total cached input tokens.
cache_creation_tokens: i64Total tokens written to cache.
thinking_tokens: i64Total reasoning/thinking tokens.
api_calls: i64Number of API calls made.
Trait Implementations§
Source§impl Clone for SessionUsage
impl Clone for SessionUsage
Source§fn clone(&self) -> SessionUsage
fn clone(&self) -> SessionUsage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionUsage
impl Debug for SessionUsage
Source§impl Default for SessionUsage
impl Default for SessionUsage
Source§fn default() -> SessionUsage
fn default() -> SessionUsage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SessionUsage
impl RefUnwindSafe for SessionUsage
impl Send for SessionUsage
impl Sync for SessionUsage
impl Unpin for SessionUsage
impl UnsafeUnpin for SessionUsage
impl UnwindSafe for SessionUsage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more