pub struct Usage {
pub primary: Option<RateWindow>,
pub secondary: Option<RateWindow>,
pub tertiary: Option<RateWindow>,
pub extra_rate_windows: Option<Vec<ExtraWindow>>,
}Expand description
The window topology for one account: up to three account-wide pools plus an optional list of per-model pools.
Fields§
§primary: Option<RateWindow>The provider’s shortest window, not its most constrained one. Absent when the provider reported no window of that cadence.
The three slots are positions, not a ranking, and they can have holes:
each is filled from its own optional upstream field, so secondary may be
absent while tertiary is present. Walk all three plus
extra_rate_windows rather than stopping at the first gap, and take the
maximum when asking how much headroom an account has.
secondary: Option<RateWindow>The next cadence up, typically weekly. Absent means not reported — never
that the window exists at zero. See Usage::primary on slot holes.
tertiary: Option<RateWindow>A third account-wide window where a provider has one. Absent means not
reported. See Usage::primary on slot holes.
extra_rate_windows: Option<Vec<ExtraWindow>>Windows whose meaning has no slot — per-model pools, scoped weeklies. Absent means the provider published none.
These are real limits, not extras in the dispensable sense: a consumer ignoring this list silently ignores whichever limits did not fit three slots.