pub struct UsageSummary {
pub membership_type: String,
pub is_unlimited: bool,
pub billing_cycle_end: String,
pub individual_usage: Option<IndividualUsage>,
pub team_usage: Option<TeamUsage>,
pub auto_model_selected_display_message: Option<String>,
pub named_model_selected_display_message: Option<String>,
}Fields§
§membership_type: String§is_unlimited: bool§billing_cycle_end: StringRFC3339 end of the current billing cycle — when the pools reset. Required: without it there is no reset to show, so its absence is schema drift, not a “no reset” state.
individual_usage: Option<IndividualUsage>§team_usage: Option<TeamUsage>Team-account usage. Present (possibly {}) whether or not the caller
is on a team; only its onDemand flag is modeled — see the module
doc for why the pool percentages come from the display-message
fallback below instead of from this object.
auto_model_selected_display_message: Option<String>e.g. "You've used 42% of your included total usage" — the auto
(Cursor Models) pool’s percentage in prose form. Redundant with
individualUsage.plan.autoPercentUsed on personal accounts; the only
source of that percentage on accounts with no plan object.
named_model_selected_display_message: Option<String>Same idea as above for the named/API pool, e.g. "You've used 100% of your included API usage".
Trait Implementations§
Source§impl Clone for UsageSummary
impl Clone for UsageSummary
Source§fn clone(&self) -> UsageSummary
fn clone(&self) -> UsageSummary
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 UsageSummary
impl Debug for UsageSummary
Source§impl<'de> Deserialize<'de> for UsageSummary
impl<'de> Deserialize<'de> for UsageSummary
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>,
Auto Trait Implementations§
impl Freeze for UsageSummary
impl RefUnwindSafe for UsageSummary
impl Send for UsageSummary
impl Sync for UsageSummary
impl Unpin for UsageSummary
impl UnsafeUnpin for UsageSummary
impl UnwindSafe for UsageSummary
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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