pub struct RateLimitMiddleware { /* private fields */ }Implementations§
Source§impl RateLimitMiddleware
impl RateLimitMiddleware
pub fn new(requests_per_second: f64, burst_size: u32) -> Self
pub fn new_with_max_ips( requests_per_second: f64, burst_size: u32, max_tracked_ips: usize, ) -> Self
pub fn from_config(cfg: &RateLimitSection) -> Self
Trait Implementations§
Source§impl IMiddleware for RateLimitMiddleware
impl IMiddleware for RateLimitMiddleware
Auto Trait Implementations§
impl !Freeze for RateLimitMiddleware
impl !RefUnwindSafe for RateLimitMiddleware
impl !UnwindSafe 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