pub struct RateWindow {
pub used_percent: f64,
pub window_minutes: u64,
pub resets_at: Option<SystemTime>,
}Expand description
One rolling usage window a harness reports against a rate limit: how much of it is spent and when it rolls over. Codex writes two, a short window and a long one, on every usage record.
Fields§
§used_percent: f64Percent of the window used, 0..=100.
window_minutes: u64The window length in minutes (Codex: 300 for the short one, 10080 weekly).
resets_at: Option<SystemTime>When the window rolls over and the usage resets, if the harness says.
Trait Implementations§
Source§impl Clone for RateWindow
impl Clone for RateWindow
Source§fn clone(&self) -> RateWindow
fn clone(&self) -> RateWindow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RateWindow
Source§impl Debug for RateWindow
impl Debug for RateWindow
Source§impl Default for RateWindow
impl Default for RateWindow
Source§fn default() -> RateWindow
fn default() -> RateWindow
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for RateWindow
impl<'de> Deserialize<'de> for RateWindow
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 RateWindow
impl PartialEq for RateWindow
Source§impl Serialize for RateWindow
impl Serialize for RateWindow
impl StructuralPartialEq for RateWindow
Auto Trait Implementations§
impl Freeze for RateWindow
impl RefUnwindSafe for RateWindow
impl Send for RateWindow
impl Sync for RateWindow
impl Unpin for RateWindow
impl UnsafeUnpin for RateWindow
impl UnwindSafe for RateWindow
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