pub struct KimiSnapshot {
pub plan: Option<String>,
pub weekly_limit: u64,
pub weekly_used: u64,
pub weekly_remaining: u64,
pub weekly_reset_at: Option<DateTime<Utc>>,
pub has_weekly: bool,
pub monthly_pct: Option<i32>,
pub monthly_reset_at: Option<DateTime<Utc>>,
pub window_limit: u64,
pub window_used: u64,
pub window_remaining: u64,
pub window_reset_at: Option<DateTime<Utc>>,
}Expand description
Kimi Code — weekly subscription quota plus a 5h rolling rate-limit window.
Accounts on the newer /coding/v1/usages response shape have no weekly
counters at all: the top-level usage block is replaced by a usages map
of ratios, of which only limit_month_total — the combined monthly pool —
is read. On such accounts has_weekly is false, the weekly counters stay
zero (never fabricated), and the monthly pool arrives as
monthly_pct/monthly_reset_at.
Fields§
§plan: Option<String>§weekly_limit: u64§weekly_used: u64§weekly_remaining: u64§weekly_reset_at: Option<DateTime<Utc>>§has_weekly: boolfalse on the newer usages-map shape, which exposes no weekly
bucket; renderers must drop the weekly row rather than draw zeros.
monthly_pct: Option<i32>Combined monthly pool usage (0..=100) on the newer shape. The
limit_month_code entry is the Code slice inside that pool, never
its own allowance, so it is not carried here.
monthly_reset_at: Option<DateTime<Utc>>§window_limit: u64§window_used: u64§window_remaining: u64§window_reset_at: Option<DateTime<Utc>>Implementations§
Source§impl KimiSnapshot
impl KimiSnapshot
Sourcepub fn weekly_pct(&self) -> i32
pub fn weekly_pct(&self) -> i32
Percentage of the weekly subscription quota consumed (0..=100).
Sourcepub fn window_pct(&self) -> i32
pub fn window_pct(&self) -> i32
Percentage of the rolling rate-limit window consumed (0..=100).
Trait Implementations§
Source§impl Clone for KimiSnapshot
impl Clone for KimiSnapshot
Source§fn clone(&self) -> KimiSnapshot
fn clone(&self) -> KimiSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KimiSnapshot
impl Debug for KimiSnapshot
impl Eq for KimiSnapshot
Source§impl PartialEq for KimiSnapshot
impl PartialEq for KimiSnapshot
impl StructuralPartialEq for KimiSnapshot
Auto Trait Implementations§
impl Freeze for KimiSnapshot
impl RefUnwindSafe for KimiSnapshot
impl Send for KimiSnapshot
impl Sync for KimiSnapshot
impl Unpin for KimiSnapshot
impl UnsafeUnpin for KimiSnapshot
impl UnwindSafe for KimiSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more