pub enum KeyExtractor {
ClientIp,
UserId,
ApiKey,
Custom(String),
Global,
}
Expand description
Key extraction strategies for rate limiting
Variants§
ClientIp
Use client IP address
UserId
Use user ID from auth context
ApiKey
Use API key
Custom(String)
Use custom field
Global
Global rate limit
Trait Implementations§
Source§impl Clone for KeyExtractor
impl Clone for KeyExtractor
Source§fn clone(&self) -> KeyExtractor
fn clone(&self) -> KeyExtractor
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 moreAuto Trait Implementations§
impl Freeze for KeyExtractor
impl RefUnwindSafe for KeyExtractor
impl Send for KeyExtractor
impl Sync for KeyExtractor
impl Unpin for KeyExtractor
impl UnwindSafe for KeyExtractor
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