A point-in-time view of the ledger.
(&self)
| 83 | |
| 84 | /// A point-in-time view of the ledger. |
| 85 | pub fn snapshot(&self) -> BudgetSnapshot { |
| 86 | BudgetSnapshot { |
| 87 | consumed_tokens: self.consumed_tokens(), |
| 88 | limit_tokens: self.limit_tokens, |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | /// Whether the configured cap has been reached. |
| 93 | pub fn is_exhausted(&self) -> bool { |