pub struct RateLimitEntry {
pub window_start: Instant,
pub request_count: u32,
}Expand description
Entry for tracking rate limit state per IP address.
Stores the timestamp of the window start and the request count.
Fields§
§window_start: InstantTimestamp of the first request in the current window
request_count: u32Number of requests in the current window
Implementations§
Trait Implementations§
Source§impl Clone for RateLimitEntry
impl Clone for RateLimitEntry
Source§fn clone(&self) -> RateLimitEntry
fn clone(&self) -> RateLimitEntry
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 RateLimitEntry
impl Debug for RateLimitEntry
Auto Trait Implementations§
impl Freeze for RateLimitEntry
impl RefUnwindSafe for RateLimitEntry
impl Send for RateLimitEntry
impl Sync for RateLimitEntry
impl Unpin for RateLimitEntry
impl UnsafeUnpin for RateLimitEntry
impl UnwindSafe for RateLimitEntry
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