pub struct RateLimitWindow {
pub max_requests: u32,
pub window_duration: Duration,
pub burst: u32,
}Expand description
Rate limit window configuration
Fields§
§max_requests: u32Maximum number of requests allowed in the window
window_duration: DurationWindow duration
burst: u32Burst allowance (extra requests allowed temporarily)
Implementations§
Trait Implementations§
Source§impl Clone for RateLimitWindow
impl Clone for RateLimitWindow
Source§fn clone(&self) -> RateLimitWindow
fn clone(&self) -> RateLimitWindow
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 RateLimitWindow
impl Debug for RateLimitWindow
Source§impl Default for RateLimitWindow
impl Default for RateLimitWindow
impl Copy for RateLimitWindow
Auto Trait Implementations§
impl Freeze for RateLimitWindow
impl RefUnwindSafe for RateLimitWindow
impl Send for RateLimitWindow
impl Sync for RateLimitWindow
impl Unpin for RateLimitWindow
impl UnsafeUnpin for RateLimitWindow
impl UnwindSafe for RateLimitWindow
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