pub struct AgentUsage {Show 38 fields
pub session_5h_tokens: u64,
pub session_5h_percent: Option<f64>,
pub week_7d_tokens: u64,
pub week_7d_percent: Option<f64>,
pub cache_read_tokens_5h: u64,
pub cache_read_tokens_7d: u64,
pub cache_read_tokens_30d: u64,
pub active_session_tokens: u64,
pub active_session_cost: f64,
pub active_session_file: Option<String>,
pub last_turn_input_tokens: u64,
pub last_turn_output_tokens: u64,
pub last_model: Option<String>,
pub last_context_window: Option<u64>,
pub last_context_pct: Option<f64>,
pub last_turn_at: Option<String>,
pub last_cwd: Option<String>,
pub active_session_started_at: Option<String>,
pub total_tokens_30d: u64,
pub total_sessions_30d: u64,
pub max_session_minutes: f64,
pub cost_5h: f64,
pub cost_7d: f64,
pub cost_today: f64,
pub total_cost_30d: f64,
pub total_input_30d: u64,
pub total_output_30d: u64,
pub cache_savings_30d: f64,
pub by_day: Vec<TimeBucket>,
pub by_week: Vec<TimeBucket>,
pub by_month: Vec<TimeBucket>,
pub by_model: Vec<NamedBucket>,
pub by_project: Vec<NamedBucket>,
pub by_day_project: Vec<DailyInstance>,
pub recent_sessions: Vec<SessionRecord>,
pub active_sessions: Vec<ActiveSession>,
pub session_5h_resets_at: Option<String>,
pub week_7d_resets_at: Option<String>,
}Fields§
§session_5h_tokens: u64§session_5h_percent: Option<f64>§week_7d_tokens: u64§week_7d_percent: Option<f64>§cache_read_tokens_5h: u64§cache_read_tokens_7d: u64§cache_read_tokens_30d: u64§active_session_tokens: u64§active_session_cost: f64§active_session_file: Option<String>§last_turn_input_tokens: u64§last_turn_output_tokens: u64§last_model: Option<String>§last_context_window: Option<u64>§last_context_pct: Option<f64>§last_turn_at: Option<String>§last_cwd: Option<String>§active_session_started_at: Option<String>§total_tokens_30d: u64§total_sessions_30d: u64§max_session_minutes: f64§cost_5h: f64§cost_7d: f64§cost_today: f64§total_cost_30d: f64§total_input_30d: u64§total_output_30d: u64§cache_savings_30d: f64Net USD prompt caching saved over the 30-day window vs paying full input.
by_day: Vec<TimeBucket>§by_week: Vec<TimeBucket>§by_month: Vec<TimeBucket>§by_model: Vec<NamedBucket>§by_project: Vec<NamedBucket>§by_day_project: Vec<DailyInstance>§recent_sessions: Vec<SessionRecord>§active_sessions: Vec<ActiveSession>§session_5h_resets_at: Option<String>§week_7d_resets_at: Option<String>Trait Implementations§
Source§impl Clone for AgentUsage
impl Clone for AgentUsage
Source§fn clone(&self) -> AgentUsage
fn clone(&self) -> AgentUsage
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 AgentUsage
impl Debug for AgentUsage
Source§impl Default for AgentUsage
impl Default for AgentUsage
Source§fn default() -> AgentUsage
fn default() -> AgentUsage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentUsage
impl<'de> Deserialize<'de> for AgentUsage
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 AgentUsage
impl RefUnwindSafe for AgentUsage
impl Send for AgentUsage
impl Sync for AgentUsage
impl Unpin for AgentUsage
impl UnsafeUnpin for AgentUsage
impl UnwindSafe for AgentUsage
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