pub struct AuthRateLimitConfig {
pub max_failed_attempts: u32,
pub ban_duration: Duration,
pub attempt_window: Duration,
}Expand description
Configuration for auth rate limiting
Fields§
§max_failed_attempts: u32Maximum failed attempts before temporary ban
ban_duration: DurationDuration of temporary ban
attempt_window: DurationWindow for counting failed attempts (resets after this time without failures)
Trait Implementations§
Source§impl Clone for AuthRateLimitConfig
impl Clone for AuthRateLimitConfig
Source§fn clone(&self) -> AuthRateLimitConfig
fn clone(&self) -> AuthRateLimitConfig
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 AuthRateLimitConfig
impl Debug for AuthRateLimitConfig
Auto Trait Implementations§
impl Freeze for AuthRateLimitConfig
impl RefUnwindSafe for AuthRateLimitConfig
impl Send for AuthRateLimitConfig
impl Sync for AuthRateLimitConfig
impl Unpin for AuthRateLimitConfig
impl UnsafeUnpin for AuthRateLimitConfig
impl UnwindSafe for AuthRateLimitConfig
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