Add another `PhaseTokens` into `self` (used for running totals).
(&mut self, other: &PhaseTokens)
| 90 | |
| 91 | /// Add another `PhaseTokens` into `self` (used for running totals). |
| 92 | pub fn add(&mut self, other: &PhaseTokens) { |
| 93 | self.input += other.input; |
| 94 | self.output += other.output; |
| 95 | self.cost_usd = compute_cost(self.input, self.output); |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | /// Aggregate token counts across all phases in a turn. |