Skip to main content

RouterExt

Trait RouterExt 

Source
pub trait RouterExt<S> {
    // Required methods
    fn with_rate_limit(
        self,
        rate_config: &RateLimitConfig,
        per_second: u64,
    ) -> Self;
    fn with_auth_middleware<E>(self, middleware: ContextMiddleware<E>) -> Self
       where E: ContextExtractor + Clone + Send + Sync + 'static;
}

Required Methods§

Source

fn with_rate_limit(self, rate_config: &RateLimitConfig, per_second: u64) -> Self

Source

fn with_auth_middleware<E>(self, middleware: ContextMiddleware<E>) -> Self
where E: ContextExtractor + Clone + Send + Sync + 'static,

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> RouterExt<S> for Router<S>
where S: Clone + Send + Sync + 'static,

Source§

fn with_rate_limit(self, rate_config: &RateLimitConfig, per_second: u64) -> Self

Source§

fn with_auth_middleware<E>(self, middleware: ContextMiddleware<E>) -> Self
where E: ContextExtractor + Clone + Send + Sync + 'static,

Implementors§