#[non_exhaustive]pub struct RateLimitInfo {
pub requests_limit: Option<u64>,
pub requests_remaining: Option<u64>,
pub requests_reset: Option<OffsetDateTime>,
pub complexity_last_query: Option<u64>,
pub complexity_limit: Option<u64>,
pub complexity_remaining: Option<u64>,
pub complexity_reset: Option<OffsetDateTime>,
pub endpoint_name: Option<String>,
pub endpoint_requests_remaining: Option<u64>,
}Expand description
Snapshot of Linear’s rate-limit budget headers, parsed from every response. The reset headers are UTC epoch milliseconds on the wire.
Never hardcode budgets — Linear’s documented numbers are inconsistent; these headers are the source of truth.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.requests_limit: Option<u64>Requests allowed per window (X-RateLimit-Requests-Limit).
requests_remaining: Option<u64>Requests remaining in the window (X-RateLimit-Requests-Remaining).
requests_reset: Option<OffsetDateTime>When the request budget resets (X-RateLimit-Requests-Reset).
complexity_last_query: Option<u64>Complexity consumed by the last query (X-Complexity).
complexity_limit: Option<u64>Complexity allowed per window (X-RateLimit-Complexity-Limit).
complexity_remaining: Option<u64>Complexity remaining in the window (X-RateLimit-Complexity-Remaining).
complexity_reset: Option<OffsetDateTime>When the complexity budget resets (X-RateLimit-Complexity-Reset).
endpoint_name: Option<String>Endpoint-specific limit name (X-RateLimit-Endpoint-Name), when present.
endpoint_requests_remaining: Option<u64>Endpoint-specific requests remaining
(X-RateLimit-Endpoint-Requests-Remaining), when present.
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