pub struct ClientRateInfo {
pub request_times: Vec<Instant>,
pub burst_tokens: f64,
pub last_refill: Instant,
}Expand description
Information about a client’s rate limit status
Fields§
§request_times: Vec<Instant>Timestamps of recent requests
burst_tokens: f64Number of tokens available for burst (stored as f64 for fractional replenishment)
last_refill: InstantLast time tokens were refilled
Implementations§
Trait Implementations§
Source§impl Clone for ClientRateInfo
impl Clone for ClientRateInfo
Source§fn clone(&self) -> ClientRateInfo
fn clone(&self) -> ClientRateInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClientRateInfo
impl RefUnwindSafe for ClientRateInfo
impl Send for ClientRateInfo
impl Sync for ClientRateInfo
impl Unpin for ClientRateInfo
impl UnwindSafe for ClientRateInfo
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