pub struct UserRateLimitStats {
pub user_id: String,
pub tier: UserTier,
pub requests_used: u32,
pub requests_limit: u32,
pub tokens_used: u32,
pub tokens_limit: Option<u32>,
pub window_remaining: Duration,
}Expand description
Per-user rate limit statistics
Fields§
§user_id: String§tier: UserTier§requests_used: u32§requests_limit: u32§tokens_used: u32§tokens_limit: Option<u32>§window_remaining: DurationTrait Implementations§
Source§impl Clone for UserRateLimitStats
impl Clone for UserRateLimitStats
Source§fn clone(&self) -> UserRateLimitStats
fn clone(&self) -> UserRateLimitStats
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 UserRateLimitStats
impl RefUnwindSafe for UserRateLimitStats
impl Send for UserRateLimitStats
impl Sync for UserRateLimitStats
impl Unpin for UserRateLimitStats
impl UnwindSafe for UserRateLimitStats
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more