pub struct RateLimitingListener<L> {
    listener: L,
    rate_limiter: SleepingRateLimiter,
}Expand description
Implementation of the Listener trait governing all returned Listener::Connection instances by a rate-limiting wrapper.
Fields§
§listener: L§rate_limiter: SleepingRateLimiterImplementations§
source§impl<L> RateLimitingListener<L>
 
impl<L> RateLimitingListener<L>
pub fn new(listener: L, rate_limiter: SleepingRateLimiter) -> Self
Trait Implementations§
source§impl<L: Listener + Send> Listener for RateLimitingListener<L>
 
impl<L: Listener + Send> Listener for RateLimitingListener<L>
type Connection = Splitted<RateLimitedAsyncRead<<<L as Listener>::Connection as Splittable>::Receiver>, <<L as Listener>::Connection as Splittable>::Sender>
type Error = <L as Listener>::Error
Auto Trait Implementations§
impl<L> RefUnwindSafe for RateLimitingListener<L>where
    L: RefUnwindSafe,
impl<L> Send for RateLimitingListener<L>where
    L: Send,
impl<L> Sync for RateLimitingListener<L>where
    L: Sync,
impl<L> Unpin for RateLimitingListener<L>where
    L: Unpin,
impl<L> UnwindSafe for RateLimitingListener<L>where
    L: UnwindSafe,
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