#[non_exhaustive]pub struct Usage {
pub five_hour: Option<Window>,
pub seven_day: Option<Window>,
pub seven_day_opus: Option<Window>,
pub seven_day_sonnet: Option<Window>,
pub seven_day_oauth_apps: Option<Window>,
pub extra_usage: Option<ExtraUsage>,
pub limits: Vec<Limit>,
pub extra: Extra,
}Expand description
GET /api/oauth/usage: the subscription’s rate-limit windows and its
extra (paid) usage.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.five_hour: Option<Window>The rolling 5-hour window.
seven_day: Option<Window>The 7-day window over all models.
seven_day_opus: Option<Window>The 7-day window for Opus models, on plans that have one.
seven_day_sonnet: Option<Window>The 7-day window for Sonnet models, on plans that have one.
seven_day_oauth_apps: Option<Window>The 7-day window for third-party OAuth apps.
extra_usage: Option<ExtraUsage>Extra usage (usage credits billed past the plan), if the account has it.
limits: Vec<Limit>The server’s list of meters, when it sends one (newer responses).
Empty when it is missing or null.
extra: ExtraAnything else (more windows as the plans grow them).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Usage
impl<'de> Deserialize<'de> for Usage
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
impl StructuralPartialEq for Usage
Auto Trait Implementations§
impl Forget for Usage
impl Freeze for Usage
impl RefUnwindSafe for Usage
impl Send for Usage
impl Sync for Usage
impl Unpin for Usage
impl UnsafeUnpin for Usage
impl UnwindSafe for Usage
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