Struct network_clique::RateLimitingDialer
source · pub struct RateLimitingDialer<D> {
dialer: D,
rate_limiter: SleepingRateLimiter,
}
Expand description
Implementation of the Dialer trait governing all returned Dialer::Connection instances by a rate-limiting wrapper.
Fields§
§dialer: D
§rate_limiter: SleepingRateLimiter
Implementations§
source§impl<D> RateLimitingDialer<D>
impl<D> RateLimitingDialer<D>
pub fn new(dialer: D, rate_limiter: SleepingRateLimiter) -> Self
Trait Implementations§
source§impl<D: Clone> Clone for RateLimitingDialer<D>
impl<D: Clone> Clone for RateLimitingDialer<D>
source§fn clone(&self) -> RateLimitingDialer<D>
fn clone(&self) -> RateLimitingDialer<D>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<A, D> Dialer<A> for RateLimitingDialer<D>where
A: Data,
D: Dialer<A>,
<D::Connection as Splittable>::Sender: Unpin,
<D::Connection as Splittable>::Receiver: Unpin,
impl<A, D> Dialer<A> for RateLimitingDialer<D>where
A: Data,
D: Dialer<A>,
<D::Connection as Splittable>::Sender: Unpin,
<D::Connection as Splittable>::Receiver: Unpin,
type Connection = Splitted<RateLimitedAsyncRead<<<D as Dialer<A>>::Connection as Splittable>::Receiver>, <<D as Dialer<A>>::Connection as Splittable>::Sender>
type Error = <D as Dialer<A>>::Error
Auto Trait Implementations§
impl<D> RefUnwindSafe for RateLimitingDialer<D>where
D: RefUnwindSafe,
impl<D> Send for RateLimitingDialer<D>where
D: Send,
impl<D> Sync for RateLimitingDialer<D>where
D: Sync,
impl<D> Unpin for RateLimitingDialer<D>where
D: Unpin,
impl<D> UnwindSafe for RateLimitingDialer<D>where
D: 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