Skip to main content

RateLimitRouterExt

Trait RateLimitRouterExt 

Source
pub trait RateLimitRouterExt {
    // Required method
    fn rate_limit(self, layer: RateLimitLayer) -> Self;
}
Expand description

Extension trait — apply a rate-limit layer to a router.

Required Methods§

Source

fn rate_limit(self, layer: RateLimitLayer) -> Self

Apply this rate-limit configuration to all routes in this router.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<S: Clone + Send + Sync + 'static> RateLimitRouterExt for Router<S>

Source§

fn rate_limit(self, layer: RateLimitLayer) -> Self

Implementors§