pub struct MultiWheel { /* private fields */ }
Implementations§
Source§impl MultiWheel
impl MultiWheel
Sourcepub fn new(n: usize, capacity: usize, granularity: Duration) -> Self
pub fn new(n: usize, capacity: usize, granularity: Duration) -> Self
Create a roulette wheel consisting of multiple time wheels
n
: n
layers of wheels
capacity
: how many slots per wheel
granularity
: the granularity of the time wheel, which must be consistent with the interval at which MultiWheel::tick is called.
pub fn add_handle(&self) -> AddHandle
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiWheel
impl !RefUnwindSafe for MultiWheel
impl Send for MultiWheel
impl !Sync for MultiWheel
impl Unpin for MultiWheel
impl !UnwindSafe for MultiWheel
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