pub struct RateLimitInfo {
pub status: RateLimitStatus,
pub resets_at: Option<i64>,
pub rate_limit_type: Option<RateLimitType>,
pub utilization: Option<f64>,
pub overage_status: Option<RateLimitStatus>,
pub overage_resets_at: Option<i64>,
pub overage_disabled_reason: Option<String>,
pub raw: Map<String, Value>,
}Expand description
Rate-limit snapshot emitted inside a Message::RateLimitEvent.
RateLimitInfo. Inner
field names on the wire are camelCase (resetsAt, rateLimitType,
overageStatus, overageResetsAt, overageDisabledReason) per the CLI
spec, while the outer frame uses snake_case.
Fields§
§status: RateLimitStatusCurrent rate-limit status.
resets_at: Option<i64>Unix timestamp (seconds) when the rate-limit window resets.
rate_limit_type: Option<RateLimitType>Which rate-limit window applies.
utilization: Option<f64>Fraction of the rate limit consumed (0.0 - 1.0).
overage_status: Option<RateLimitStatus>Status of overage / pay-as-you-go usage, if applicable.
overage_resets_at: Option<i64>Unix timestamp (seconds) when overage window resets.
overage_disabled_reason: Option<String>Why overage is unavailable when rejected.
raw: Map<String, Value>Echo of the raw CLI payload so callers can introspect fields
forge-sdk doesn’t yet type. serde’s flatten makes this the
catch-all bucket for unknown keys on the wire.
Trait Implementations§
Source§impl Clone for RateLimitInfo
impl Clone for RateLimitInfo
Source§impl Debug for RateLimitInfo
impl Debug for RateLimitInfo
Source§impl<'de> Deserialize<'de> for RateLimitInfo
impl<'de> Deserialize<'de> for RateLimitInfo
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 RateLimitInfo
impl PartialEq for RateLimitInfo
Source§impl Serialize for RateLimitInfo
impl Serialize for RateLimitInfo
impl StructuralPartialEq for RateLimitInfo
Auto Trait Implementations§
impl Freeze for RateLimitInfo
impl RefUnwindSafe for RateLimitInfo
impl Send for RateLimitInfo
impl Sync for RateLimitInfo
impl Unpin for RateLimitInfo
impl UnsafeUnpin for RateLimitInfo
impl UnwindSafe for RateLimitInfo
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