Struct calloop::sources::timer::TimerWheel
source · pub(crate) struct TimerWheel {
heap: BinaryHeap<TimeoutData>,
counter: u32,
}
Fields§
§heap: BinaryHeap<TimeoutData>
§counter: u32
Implementations§
source§impl TimerWheel
impl TimerWheel
pub(crate) fn new() -> TimerWheel
pub(crate) fn insert(&mut self, deadline: Instant, token: Token) -> u32
pub(crate) fn insert_reuse( &mut self, counter: u32, deadline: Instant, token: Token, )
pub(crate) fn cancel(&mut self, counter: u32)
pub(crate) fn next_expired(&mut self, now: Instant) -> Option<(u32, Token)>
pub(crate) fn next_deadline(&self) -> Option<Instant>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimerWheel
impl !RefUnwindSafe for TimerWheel
impl Send for TimerWheel
impl !Sync for TimerWheel
impl Unpin for TimerWheel
impl UnwindSafe for TimerWheel
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