pub struct WarpRequestLimitInfo {
pub limit: i64,
pub used: i64,
pub reset_in_seconds: Option<i64>,
}Expand description
Usage / limit information returned by the Warp GraphQL API.
Fields§
§limit: i64Maximum number of requests allowed in the current window.
used: i64Number of requests consumed so far.
reset_in_seconds: Option<i64>Seconds until the window resets. None if no reset is applicable.
Implementations§
Source§impl WarpRequestLimitInfo
impl WarpRequestLimitInfo
Sourcepub fn is_limited(&self) -> bool
pub fn is_limited(&self) -> bool
Returns true when the usage has reached or exceeded the limit.
Sourcepub fn utilization(&self) -> f64
pub fn utilization(&self) -> f64
Returns usage as a percentage (0–100). Returns 100.0 when limit is zero or negative.
Trait Implementations§
Source§impl Debug for WarpRequestLimitInfo
impl Debug for WarpRequestLimitInfo
Source§impl<'de> Deserialize<'de> for WarpRequestLimitInfo
impl<'de> Deserialize<'de> for WarpRequestLimitInfo
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
Auto Trait Implementations§
impl Freeze for WarpRequestLimitInfo
impl RefUnwindSafe for WarpRequestLimitInfo
impl Send for WarpRequestLimitInfo
impl Sync for WarpRequestLimitInfo
impl Unpin for WarpRequestLimitInfo
impl UnsafeUnpin for WarpRequestLimitInfo
impl UnwindSafe for WarpRequestLimitInfo
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