pub struct RateLimitMiddleware {
pub max_per_second: u32,
}Expand description
Rate limiting middleware (uses the rate limiter).
Fields§
§max_per_second: u32Trait Implementations§
Source§impl Middleware for RateLimitMiddleware
impl Middleware for RateLimitMiddleware
fn name(&self) -> &str
fn process(&self, ctx: &RequestContext) -> MiddlewareResult
Auto Trait Implementations§
impl Freeze for RateLimitMiddleware
impl RefUnwindSafe for RateLimitMiddleware
impl Send for RateLimitMiddleware
impl Sync for RateLimitMiddleware
impl Unpin for RateLimitMiddleware
impl UnsafeUnpin for RateLimitMiddleware
impl UnwindSafe for RateLimitMiddleware
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more