pub enum RateLimitResult {
Allowed(RateLimitStatistics),
TooManyRequests(RateLimitStatistics),
}Expand description
This enum represents the result of a rate limit operation, indicating whether a request should be allowed or rejected based on the current rate limit state, along with statistics about the rate limit bucket.
Variants§
Allowed(RateLimitStatistics)
The request is allowed to proceed.
Contains statistics about the current state of the rate limit bucket.
TooManyRequests(RateLimitStatistics)
The request should be rejected due to rate limit exceeded.
Contains statistics about the current state of the rate limit bucket, including when the limit will reset.
Auto Trait Implementations§
impl Freeze for RateLimitResult
impl RefUnwindSafe for RateLimitResult
impl Send for RateLimitResult
impl Sync for RateLimitResult
impl Unpin for RateLimitResult
impl UnsafeUnpin for RateLimitResult
impl UnwindSafe for RateLimitResult
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