pub trait RateLimitAlgorithm {
// Required methods
fn requests_per_second(&self) -> u64;
fn update<'life0, 'async_trait>(
&'life0 self,
sample: RequestSample,
) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
An algorithm for controlling request rate limits.
Required Methods§
Sourcefn requests_per_second(&self) -> u64
fn requests_per_second(&self) -> u64
The current requests per second limit.