struct Pace {
tokens: f64,
at: Instant,
}Expand description
Paces a client’s new subscriptions: each spends a token, and tokens
come back at SUBSCRIBE_RATE a second up to SUBSCRIBE_BURST.
Fields§
§tokens: f64§at: InstantImplementations§
Auto Trait Implementations§
impl Freeze for Pace
impl RefUnwindSafe for Pace
impl Send for Pace
impl Sync for Pace
impl Unpin for Pace
impl UnsafeUnpin for Pace
impl UnwindSafe for Pace
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