pub enum RateLimitKey {
Ip,
Identity,
IpAndInput {
field: &'static str,
},
}Expand description
How the rate-limit key is derived (overridden by RateLimit::key_fn).
Variants§
Ip
Client IP (ClientAddr).
Identity
RateLimitIdentity when set, otherwise IP.
IpAndInput
ip + lowercased form/json field (empty field → IP only).
Trait Implementations§
Source§impl Clone for RateLimitKey
impl Clone for RateLimitKey
impl Copy for RateLimitKey
Source§impl Debug for RateLimitKey
impl Debug for RateLimitKey
Auto Trait Implementations§
impl Freeze for RateLimitKey
impl RefUnwindSafe for RateLimitKey
impl Send for RateLimitKey
impl Sync for RateLimitKey
impl Unpin for RateLimitKey
impl UnsafeUnpin for RateLimitKey
impl UnwindSafe for RateLimitKey
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