pub struct NoopRateLimiter;Expand description
A rate limiter that always allows. Useful for testing and development environments where rate limiting is disabled.
Trait Implementations§
Source§impl RateLimiter for NoopRateLimiter
impl RateLimiter for NoopRateLimiter
Source§fn check(&self, _key: &str) -> bool
fn check(&self, _key: &str) -> bool
Check if a request is allowed. Consumes one token if allowed.
Returns
true if allowed, false if rate-limited.Auto Trait Implementations§
impl Freeze for NoopRateLimiter
impl RefUnwindSafe for NoopRateLimiter
impl Send for NoopRateLimiter
impl Sync for NoopRateLimiter
impl Unpin for NoopRateLimiter
impl UnsafeUnpin for NoopRateLimiter
impl UnwindSafe for NoopRateLimiter
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