pub trait RateLimit: Sync + Send {
// Required method
fn check<'a>(
&'a self,
rate_key: &'a str,
max: i32,
points: i32,
window_in_seconds: i32,
) -> Pin<Box<dyn Future<Output = Result<i32, RateLimitError>> + Send + 'a>>;
}Required Methods§
fn check<'a>( &'a self, rate_key: &'a str, max: i32, points: i32, window_in_seconds: i32, ) -> Pin<Box<dyn Future<Output = Result<i32, RateLimitError>> + Send + 'a>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".