pub struct RateLimitCheckResult {
pub allowed: bool,
pub current_requests: u64,
pub max_requests: u64,
pub window_type: String,
pub retry_after: Option<DateTime<Utc>>,
pub reason: Option<String>,
}Expand description
Result of rate limit check
Fields§
§allowed: boolWhether the request is allowed
current_requests: u64Current requests in the current window
max_requests: u64Maximum requests allowed in the window
window_type: StringWindow type (minute, hour, day)
retry_after: Option<DateTime<Utc>>Retry after timestamp (if rate limited)
reason: Option<String>Reason if not allowed
Trait Implementations§
Source§impl Clone for RateLimitCheckResult
impl Clone for RateLimitCheckResult
Source§fn clone(&self) -> RateLimitCheckResult
fn clone(&self) -> RateLimitCheckResult
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 moreSource§impl Debug for RateLimitCheckResult
impl Debug for RateLimitCheckResult
Source§impl<'de> Deserialize<'de> for RateLimitCheckResult
impl<'de> Deserialize<'de> for RateLimitCheckResult
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 RateLimitCheckResult
impl RefUnwindSafe for RateLimitCheckResult
impl Send for RateLimitCheckResult
impl Sync for RateLimitCheckResult
impl Unpin for RateLimitCheckResult
impl UnsafeUnpin for RateLimitCheckResult
impl UnwindSafe for RateLimitCheckResult
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