struct RateBucket {
tokens: f64,
last_refill: Instant,
}Expand description
Per-IP token bucket used by listen_to_ping_msg to drop floods.
Fields§
§tokens: f64§last_refill: InstantImplementations§
Auto Trait Implementations§
impl Freeze for RateBucket
impl RefUnwindSafe for RateBucket
impl Send for RateBucket
impl Sync for RateBucket
impl Unpin for RateBucket
impl UnsafeUnpin for RateBucket
impl UnwindSafe for RateBucket
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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