pub struct GrokbotSnapshot {
pub plan: String,
pub has_included_allowance: bool,
pub weekly_pct: i32,
pub has_available_usage: bool,
pub on_demand_enabled: bool,
pub period_start: Option<DateTime<Utc>>,
pub reset_at: Option<DateTime<Utc>>,
pub window: Option<Duration>,
}Expand description
Grok Bot desktop app — the weekly included-usage pool from
aiserver.v1.DashboardService/GetSandUsageStatus (Connect-RPC), read with
the app’s own OAuth session. Distinct from GrokSnapshot (Management
API prepaid dollars) and SuperGrokSnapshot (Grok Build subscription).
Fields§
§plan: StringgrokPlanLabel, falling back to cursorPlanName, then “Grok Bot”.
has_included_allowance: boolhasNonZeroIncludedLimit. When false the account carries no included
allowance at all — a distinct “no included allowance” state, never a
fabricated 0% meter.
weekly_pct: i32usagePercent of the included pool (0..=100). Meaningful only when
has_included_allowance is set.
has_available_usage: boolhasAvailableUsage — the account can still serve requests, which at
100% of the included pool means on-demand is picking up the rest.
on_demand_enabled: boolonDemandSettings.enabled — pay-as-you-go past the included pool.
period_start: Option<DateTime<Utc>>currentPeriodStart.
reset_at: Option<DateTime<Utc>>nextResetTimestampUtc.
window: Option<Duration>reset_at − period_start when both are reported (7 days on the
captured account) — computed, never assumed.
Implementations§
Source§impl GrokbotSnapshot
impl GrokbotSnapshot
Sourcepub fn on_demand_note(&self) -> Option<&'static str>
pub fn on_demand_note(&self) -> Option<&'static str>
At 100% of the included pool, hasAvailableUsage can still be true
because on-demand keeps serving — say so, but only when the account
actually has on-demand switched on.
Trait Implementations§
Source§impl Clone for GrokbotSnapshot
impl Clone for GrokbotSnapshot
Source§impl Debug for GrokbotSnapshot
impl Debug for GrokbotSnapshot
impl Eq for GrokbotSnapshot
Source§impl PartialEq for GrokbotSnapshot
impl PartialEq for GrokbotSnapshot
impl StructuralPartialEq for GrokbotSnapshot
Auto Trait Implementations§
impl Freeze for GrokbotSnapshot
impl RefUnwindSafe for GrokbotSnapshot
impl Send for GrokbotSnapshot
impl Sync for GrokbotSnapshot
impl Unpin for GrokbotSnapshot
impl UnsafeUnpin for GrokbotSnapshot
impl UnwindSafe for GrokbotSnapshot
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