pub struct CostReport {
pub total_cost_usd: f64,
pub total_input_tokens: u64,
pub total_output_tokens: u64,
pub per_model: BTreeMap<String, ModelCostBreakdown>,
pub budget_limit_usd: Option<f64>,
pub is_over_budget: bool,
}Expand description
Snapshot of all tracked usage, including budget status.
Fields§
§total_cost_usd: f64Total recorded spend in USD.
total_input_tokens: u64Total input tokens recorded.
total_output_tokens: u64Total output tokens recorded.
per_model: BTreeMap<String, ModelCostBreakdown>Spend broken down per model, keyed by model name.
budget_limit_usd: Option<f64>Configured budget limit, if any.
is_over_budget: boolWhether total spend has reached or exceeded the budget.
Trait Implementations§
Source§impl Clone for CostReport
impl Clone for CostReport
Source§impl Debug for CostReport
impl Debug for CostReport
Source§impl PartialEq for CostReport
impl PartialEq for CostReport
impl StructuralPartialEq for CostReport
Auto Trait Implementations§
impl Freeze for CostReport
impl RefUnwindSafe for CostReport
impl Send for CostReport
impl Sync for CostReport
impl Unpin for CostReport
impl UnsafeUnpin for CostReport
impl UnwindSafe for CostReport
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