Build a `PhaseTokens` from raw counts, computing cost automatically.
(input: u32, output: u32)
| 81 | impl PhaseTokens { |
| 82 | /// Build a `PhaseTokens` from raw counts, computing cost automatically. |
| 83 | pub fn from_counts(input: u32, output: u32) -> Self { |
| 84 | Self { |
| 85 | input, |
| 86 | output, |
| 87 | cost_usd: compute_cost(input, output), |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | /// Add another `PhaseTokens` into `self` (used for running totals). |
| 92 | pub fn add(&mut self, other: &PhaseTokens) { |
nothing calls this directly
no test coverage detected