pub enum RateLimitUnavailable {
FailOpen,
FailClosed,
SoftDenyAfterThreshold(u32),
}Expand description
Behaviour when the rate-limit store is unavailable (RFC-008 §4).
Variants§
FailOpen
Allow the operation to proceed; log the store error internally. Appropriate when rate limiting is a defence-in-depth layer and availability is preferred over strict enforcement.
FailClosed
Deny the operation. Appropriate when rate limiting is a hard requirement and availability is secondary.
SoftDenyAfterThreshold(u32)
Allow until the counter reaches n above the normal threshold,
then deny. A compromise for services with intermittent store issues.
Trait Implementations§
Source§fn clone(&self) -> RateLimitUnavailable
fn clone(&self) -> RateLimitUnavailable
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§fn default() -> RateLimitUnavailable
fn default() -> RateLimitUnavailable
Returns the “default value” for a type. Read more
Source§fn eq(&self, other: &RateLimitUnavailable) -> bool
fn eq(&self, other: &RateLimitUnavailable) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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