pub struct QuotaLimitEntry {
pub kind: Option<String>,
pub unit: Option<i64>,
pub number: Option<i64>,
pub usage: Option<f64>,
pub remaining: Option<f64>,
pub next_reset_time: Option<i64>,
}Expand description
One rolling window, in credits. usage is the per-window LIMIT
(28000 on a 5h Max window, 140000 weekly), not consumption;
consumption is usage - remaining. unit 3 counts hours (the
5-hour window, number 5), unit 6 counts weeks (number 1).
Deliberately partial: the payload also carries a percentage and
a currentValue that lags at 0; neither is mapped.
Fields§
§kind: Option<String>Entry kind; only "CREDIT_LIMIT" entries carry the windows.
unit: Option<i64>Time unit: 3 = hours, 6 = weeks.
number: Option<i64>How many units the window spans.
usage: Option<f64>The per-window credit limit.
remaining: Option<f64>Credits still available in the window.
next_reset_time: Option<i64>Epoch milliseconds. Absent on the 5-hour entry until the first successful request, which starts the window; the weekly entry resets on the purchase anniversary.
Trait Implementations§
Source§impl Clone for QuotaLimitEntry
impl Clone for QuotaLimitEntry
Source§impl Debug for QuotaLimitEntry
impl Debug for QuotaLimitEntry
Source§impl Default for QuotaLimitEntry
impl Default for QuotaLimitEntry
Source§impl<'de> Deserialize<'de> for QuotaLimitEntry
impl<'de> Deserialize<'de> for QuotaLimitEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for QuotaLimitEntry
impl PartialEq for QuotaLimitEntry
Source§impl Serialize for QuotaLimitEntry
impl Serialize for QuotaLimitEntry
impl StructuralPartialEq for QuotaLimitEntry
Auto Trait Implementations§
impl Freeze for QuotaLimitEntry
impl RefUnwindSafe for QuotaLimitEntry
impl Send for QuotaLimitEntry
impl Sync for QuotaLimitEntry
impl Unpin for QuotaLimitEntry
impl UnsafeUnpin for QuotaLimitEntry
impl UnwindSafe for QuotaLimitEntry
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