pub struct UnifiedWindowUsage {
pub utilization: f64,
pub resets_at: u64,
pub status: Option<RateLimitStatus>,
pub surpassed_threshold: Option<f64>,
}Expand description
Usage for a single unified rate-limit window, carried in
UnifiedRateLimitWindows.
Fields§
§utilization: f64Fraction of the window used (usually 0.0–1.0; values above 1.0 occur when usage legitimately runs past a window’s cap).
resets_at: u64Unix epoch seconds when this window resets.
status: Option<RateLimitStatus>Status the server sent for this window: allowed_warning once past a
warning threshold, rejected at or past its limit. A rejected window
alone does not mean requests are refused; the top-level
RateLimitInfo::status says whether they are. Absent when the server
sent none (CLI 2.1.310+).
surpassed_threshold: Option<f64>Highest warning threshold passed, as a fraction of the window’s limit (1.0 once rejected). Absent when the server sent none (CLI 2.1.310+).
Trait Implementations§
Source§impl Clone for UnifiedWindowUsage
impl Clone for UnifiedWindowUsage
Source§impl Debug for UnifiedWindowUsage
impl Debug for UnifiedWindowUsage
Source§impl<'de> Deserialize<'de> for UnifiedWindowUsage
impl<'de> Deserialize<'de> for UnifiedWindowUsage
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 UnifiedWindowUsage
impl PartialEq for UnifiedWindowUsage
Source§impl Serialize for UnifiedWindowUsage
impl Serialize for UnifiedWindowUsage
impl StructuralPartialEq for UnifiedWindowUsage
Auto Trait Implementations§
impl Freeze for UnifiedWindowUsage
impl RefUnwindSafe for UnifiedWindowUsage
impl Send for UnifiedWindowUsage
impl Sync for UnifiedWindowUsage
impl Unpin for UnifiedWindowUsage
impl UnsafeUnpin for UnifiedWindowUsage
impl UnwindSafe for UnifiedWindowUsage
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