struct WindowAcc {
by_project_model: BTreeMap<String, BTreeMap<String, TokenCounts>>,
}Expand description
Per-window accumulator keyed project -> model -> counts. Keeping
the model split under each project lets the by-project rows sum cost
across a project’s differently-priced models.
Fields§
§by_project_model: BTreeMap<String, BTreeMap<String, TokenCounts>>Implementations§
Source§impl WindowAcc
impl WindowAcc
fn add(&mut self, project: &str, model: &str, counts: &TokenCounts)
fn finish(&self, pricing: &PricingTable) -> WindowUsage
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WindowAcc
impl RefUnwindSafe for WindowAcc
impl Send for WindowAcc
impl Sync for WindowAcc
impl Unpin for WindowAcc
impl UnsafeUnpin for WindowAcc
impl UnwindSafe for WindowAcc
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