pub struct Queue { /* private fields */ }Expand description
The default timer queue, configured by the crate’s features.
If any of the generic-queue-X features are enabled, this implements a generic
timer queue of capacity X. Otherwise, it implements an integrated timer queue.
Implementations§
Source§impl Queue
impl Queue
Sourcepub fn schedule_wake(&mut self, at: u64, waker: &Waker) -> bool
pub fn schedule_wake(&mut self, at: u64, waker: &Waker) -> bool
Schedules a task to run at a specific time, and returns whether any changes were made.
If this function returns true, the caller should find the next expiration time and set
a new alarm for that time.
Sourcepub fn next_expiration(&mut self, now: u64) -> u64
pub fn next_expiration(&mut self, now: u64) -> u64
Dequeues expired timers and returns the next alarm time.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Queue
impl !RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl !UnwindSafe for Queue
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