pub struct RoleRateLimitStats {
pub current_requests: u32,
pub blocked_requests: u64,
pub total_requests: u64,
pub in_cooldown: bool,
pub cooldown_ends_at: Option<DateTime<Utc>>,
pub last_window_start: Option<DateTime<Utc>>,
}
Expand description
Per-role rate limiting statistics
Fields§
§current_requests: u32
Current requests in window
blocked_requests: u64
Requests blocked due to rate limits
total_requests: u64
Total requests processed
in_cooldown: bool
Is currently in cooldown
cooldown_ends_at: Option<DateTime<Utc>>
Cooldown ends at (if in cooldown)
last_window_start: Option<DateTime<Utc>>
When the current window started
Trait Implementations§
Source§impl Clone for RoleRateLimitStats
impl Clone for RoleRateLimitStats
Source§fn clone(&self) -> RoleRateLimitStats
fn clone(&self) -> RoleRateLimitStats
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 moreSource§impl Debug for RoleRateLimitStats
impl Debug for RoleRateLimitStats
Source§impl<'de> Deserialize<'de> for RoleRateLimitStats
impl<'de> Deserialize<'de> for RoleRateLimitStats
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
Auto Trait Implementations§
impl Freeze for RoleRateLimitStats
impl RefUnwindSafe for RoleRateLimitStats
impl Send for RoleRateLimitStats
impl Sync for RoleRateLimitStats
impl Unpin for RoleRateLimitStats
impl UnwindSafe for RoleRateLimitStats
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