pub struct OauthUsage {
pub five_hour: Option<OauthUsageWindow>,
pub seven_day: Option<OauthUsageWindow>,
pub seven_day_opus: Option<OauthUsageWindow>,
pub seven_day_sonnet: Option<OauthUsageWindow>,
pub extra_usage: Option<OauthExtraUsage>,
}Expand description
Top-level OAuth usage payload. All fields are optional because the API can omit any window for accounts that don’t qualify (free tier, new account, etc.).
Fields§
§five_hour: Option<OauthUsageWindow>Rolling 5-hour rate-limit window (the “session” budget).
seven_day: Option<OauthUsageWindow>Rolling 7-day rate-limit window across all models.
seven_day_opus: Option<OauthUsageWindow>Rolling 7-day rate-limit window scoped to Opus.
seven_day_sonnet: Option<OauthUsageWindow>Rolling 7-day rate-limit window scoped to Sonnet.
extra_usage: Option<OauthExtraUsage>Pay-as-you-go credit balance, when the account opted in.
Trait Implementations§
Source§impl Clone for OauthUsage
impl Clone for OauthUsage
Source§impl Debug for OauthUsage
impl Debug for OauthUsage
Source§impl Default for OauthUsage
impl Default for OauthUsage
Source§impl<'de> Deserialize<'de> for OauthUsage
impl<'de> Deserialize<'de> for OauthUsage
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 OauthUsage
impl PartialEq for OauthUsage
Source§impl Serialize for OauthUsage
impl Serialize for OauthUsage
impl StructuralPartialEq for OauthUsage
Auto Trait Implementations§
impl Freeze for OauthUsage
impl RefUnwindSafe for OauthUsage
impl Send for OauthUsage
impl Sync for OauthUsage
impl Unpin for OauthUsage
impl UnsafeUnpin for OauthUsage
impl UnwindSafe for OauthUsage
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