pub trait RateLimiter: Send + Sync + 'static {
    // Required method
    fn acquire_permit<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Request rate limiter.

Required Methods§

source

fn acquire_permit<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Acquires a permit to issue the next request.

Implementors§