pub struct RateLimitInfo {Show 17 fields
pub status: RateLimitStatus,
pub resets_at: Option<u64>,
pub rate_limit_type: Option<RateLimitWindow>,
pub utilization: Option<f64>,
pub unified_windows: Option<UnifiedRateLimitWindows>,
pub overage_status: Option<OverageStatus>,
pub overage_resets_at: Option<u64>,
pub overage_disabled_reason: Option<OverageDisabledReason>,
pub is_using_overage: Option<bool>,
pub overage_in_use: Option<bool>,
pub surpassed_threshold: Option<f64>,
pub rate_limit_grace_active: Option<bool>,
pub overage_period_monthly: Option<OveragePeriodUtilization>,
pub overage_period_channel: Option<OveragePeriodUtilization>,
pub error_code: Option<RateLimitErrorCode>,
pub can_user_purchase_credits: Option<bool>,
pub has_chargeable_saved_payment_method: Option<bool>,
}Expand description
Rate limit status information.
Fields§
§status: RateLimitStatusCurrent rate limit status
resets_at: Option<u64>Unix timestamp when the rate limit resets
rate_limit_type: Option<RateLimitWindow>Type of rate limit window
utilization: Option<f64>Utilization of the rate limit (0.0 to 1.0)
unified_windows: Option<UnifiedRateLimitWindows>Per-window usage for the 5-hour, weekly, and overage-included weekly
subscription windows, read from the anthropic-ratelimit-unified-*
response headers. Unlike the top-level status/utilization (which
describe the currently limiting window), every window here is tracked
on each observation. Absent until the first response carrying these
headers, and always absent for API-key/Bedrock/Vertex sessions
(CLI 2.1.259+).
overage_status: Option<OverageStatus>Overage status (e.g., rejected, allowed)
overage_resets_at: Option<u64>Unix timestamp when the overage window resets
overage_disabled_reason: Option<OverageDisabledReason>Reason overage is disabled, if applicable
is_using_overage: Option<bool>Whether overage billing is active for the current request
overage_in_use: Option<bool>Whether overage billing is in use for the account
surpassed_threshold: Option<f64>Utilization warning threshold that was crossed (0.0 to 1.0)
rate_limit_grace_active: Option<bool>Latched usage-limit grace signal, observed on responses to requests
that sent anthropic-usage-limit: extended. While set, an
overageStatus of allowed/allowed_warning means paid extra usage
covers the overflow; combine with status rather than reading this
alone as “still usable” (CLI 2.1.259+).
overage_period_monthly: Option<OveragePeriodUtilization>Monthly service spend-cap utilization (Claude-in-Slack surface)
overage_period_channel: Option<OveragePeriodUtilization>Per-channel spend-cap utilization (Claude-in-Slack surface)
error_code: Option<RateLimitErrorCode>Error code attached when a request was refused outright
can_user_purchase_credits: Option<bool>Whether the user is able to purchase credits themselves
has_chargeable_saved_payment_method: Option<bool>Whether the account has a chargeable saved payment method
Trait Implementations§
Source§impl Clone for RateLimitInfo
impl Clone for RateLimitInfo
Source§fn clone(&self) -> RateLimitInfo
fn clone(&self) -> RateLimitInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more