pub struct SessionUsage {Show 14 fields
pub model: String,
pub input_tokens: u64,
pub output_tokens: u64,
pub cache_read_tokens: u64,
pub cache_write_tokens: u64,
pub total_tokens: u64,
pub estimated_cost_usd: f64,
pub context_window_size: u64,
pub context_window_used_pct: f64,
pub current_context_tokens: u64,
pub total_context_sent: u64,
pub cache_hit_pct: f64,
pub message_count: u64,
pub session_id: String,
}Expand description
Usage summary for a single session, returned to the frontend status bar.
Fields§
§model: String§input_tokens: u64§output_tokens: u64§cache_read_tokens: u64§cache_write_tokens: u64§total_tokens: u64§estimated_cost_usd: f64§context_window_size: u64§context_window_used_pct: f64§current_context_tokens: u64Last message’s total input context (current context window usage).
total_context_sent: u64Cumulative context sent (input + cache_read + cache_write).
cache_hit_pct: f64cache_read / (input + cache_read), in percent. 0 when no cache activity.
message_count: u64§session_id: StringTrait 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 (const: unstable) · 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