pub struct Totals {
pub cost: f64,
pub requests: u64,
pub input: u64,
pub output: u64,
pub cache_read: u64,
}Fields§
§cost: f64§requests: u64§input: u64§output: u64§cache_read: u64Implementations§
Source§impl Totals
impl Totals
Sourcepub fn add(&mut self, row: &Row, cost: f64)
pub fn add(&mut self, row: &Row, cost: f64)
Add one turn at cost — priced by the caller, which is the whole point:
row.cost_usd is opencode’s figure, always the off-peak sheet, so the
dashboard prices each turn on the documented schedule instead and falls
back to the recorded cost when the model carries no rates.
pub fn tokens(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Totals
impl RefUnwindSafe for Totals
impl Send for Totals
impl Sync for Totals
impl Unpin for Totals
impl UnsafeUnpin for Totals
impl UnwindSafe for Totals
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