pub struct RateLimitMiddleware { /* private fields */ }Expand description
Rate limit middleware — limits calls per minute.
Implementations§
Trait Implementations§
Source§impl Middleware for RateLimitMiddleware
impl Middleware for RateLimitMiddleware
Source§fn phases(&self) -> Vec<MiddlewarePhase>
fn phases(&self) -> Vec<MiddlewarePhase>
Phases at which this middleware wishes to be invoked.
Source§fn handle<'a>(
&'a self,
ctx: &'a MiddlewareContext,
) -> Pin<Box<dyn Future<Output = MiddlewareResult> + Send + 'a>>
fn handle<'a>( &'a self, ctx: &'a MiddlewareContext, ) -> Pin<Box<dyn Future<Output = MiddlewareResult> + Send + 'a>>
Inspect the context for the current phase and return a result.
Auto Trait Implementations§
impl !RefUnwindSafe for RateLimitMiddleware
impl !UnwindSafe for RateLimitMiddleware
impl Freeze for RateLimitMiddleware
impl Send for RateLimitMiddleware
impl Sync for RateLimitMiddleware
impl Unpin for RateLimitMiddleware
impl UnsafeUnpin 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