Struct rate_limiter::RateLimiter
source · pub struct RateLimiter {
rate_limiter: BoxFuture<'static, SleepingRateLimiter>,
}
Expand description
Wrapper around SleepingRateLimiter to simplify implementation of the AsyncRead trait.
Fields§
§rate_limiter: BoxFuture<'static, SleepingRateLimiter>
Implementations§
source§impl RateLimiter
impl RateLimiter
sourcepub fn new(rate_limiter: SleepingRateLimiter) -> Self
pub fn new(rate_limiter: SleepingRateLimiter) -> Self
Constructs an instance of RateLimiter that uses already configured rate-limiting access governor (SleepingRateLimiter).
Auto Trait Implementations§
impl !RefUnwindSafe for RateLimiter
impl Send for RateLimiter
impl !Sync for RateLimiter
impl Unpin for RateLimiter
impl !UnwindSafe for RateLimiter
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