Struct RateLimitLayer
pub struct RateLimitLayer { /* private fields */ }
Enforces a rate limit on the number of requests the underlying service can handle over a period of time.
Implementations
impl RateLimitLayer
const fn new(num: u64, per: Duration) -> SelfCreate new rate limit layer.
Trait Implementations
impl Clone for RateLimitLayer
fn clone(&self) -> Self
impl Debug for RateLimitLayer
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<S> Layer<S> for RateLimitLayer
type Service = RateLimit<S>;fn layer(&self, service: S) -> Self::Service