pub trait CacheAwareRateLimiter:
Send
+ Sync
+ 'static {
// Required methods
fn until_key_ready(
&self,
key: &str,
) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>;
fn check_key(&self, key: &str) -> bool;
}Available on crate feature
rate-limiting only.Expand description
A trait for rate limiting that can be implemented by different rate limiting strategies
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".