pub struct TimerList { /* private fields */ }
Expand description
TimerList provides the interface to the event loop for activating times and determining the nearest timeout.
Implementations§
Source§impl TimerList
impl TimerList
Sourcepub fn next_timeout() -> Option<Instant>
pub fn next_timeout() -> Option<Instant>
Returns the timeout of the timer that should fire the soonest, or None if there is no timer active.
Sourcepub fn maybe_activate_timers(now: Instant) -> bool
pub fn maybe_activate_timers(now: Instant) -> bool
Activates any expired timers by calling their callback function. Returns true if any timers were activated; false otherwise.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimerList
impl !RefUnwindSafe for TimerList
impl !Send for TimerList
impl !Sync for TimerList
impl Unpin for TimerList
impl !UnwindSafe for TimerList
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