pub struct RateLimit {
pub primary: Option<RateWindow>,
pub secondary: Option<RateWindow>,
pub plan: Option<String>,
pub reached: bool,
}Expand description
What a harness reports about how close a session is to its rate limit. Only
the harnesses that write it (Codex today) populate this; the rest leave it
None. Read-only, like everything else: a number the harness already wrote.
Fields§
§primary: Option<RateWindow>The short rolling window.
secondary: Option<RateWindow>The long rolling window.
plan: Option<String>The plan the limit is for (Codex: plus, pro, …).
reached: boolTrue when the harness says the limit is currently hit.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RateLimit
impl<'de> Deserialize<'de> for RateLimit
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
impl StructuralPartialEq for RateLimit
Auto Trait Implementations§
impl Freeze for RateLimit
impl RefUnwindSafe for RateLimit
impl Send for RateLimit
impl Sync for RateLimit
impl Unpin for RateLimit
impl UnsafeUnpin for RateLimit
impl UnwindSafe for RateLimit
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