pub struct KeyedRateLimitConfig { /* private fields */ }Expand description
State for keyed limits. Product code extracts the key; Forge trims and lowercases it.
Implementations§
Source§impl KeyedRateLimitConfig
impl KeyedRateLimitConfig
Sourcepub fn new<K, F>(
limiter: NormalizedStringRateLimiter,
key: K,
rejection: F,
) -> Self
pub fn new<K, F>( limiter: NormalizedStringRateLimiter, key: K, rejection: F, ) -> Self
Supplies a shared limiter, product key extraction, and product rejection response.
Trait Implementations§
Source§impl Clone for KeyedRateLimitConfig
impl Clone for KeyedRateLimitConfig
Source§fn clone(&self) -> KeyedRateLimitConfig
fn clone(&self) -> KeyedRateLimitConfig
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 KeyedRateLimitConfig
impl !RefUnwindSafe for KeyedRateLimitConfig
impl Send for KeyedRateLimitConfig
impl Sync for KeyedRateLimitConfig
impl Unpin for KeyedRateLimitConfig
impl UnsafeUnpin for KeyedRateLimitConfig
impl !UnwindSafe for KeyedRateLimitConfig
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