Skip to main content

RateLimit

Trait RateLimit 

Source
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§

Source

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>>

Implementors§