pub struct ConstGenericQueue<const QUEUE_SIZE: usize> { /* private fields */ }Expand description
A timer queue with a pre-determined capacity.
Implementations§
Source§impl<const QUEUE_SIZE: usize> ConstGenericQueue<QUEUE_SIZE>
impl<const QUEUE_SIZE: usize> ConstGenericQueue<QUEUE_SIZE>
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<const QUEUE_SIZE: usize> Freeze for ConstGenericQueue<QUEUE_SIZE>
impl<const QUEUE_SIZE: usize> RefUnwindSafe for ConstGenericQueue<QUEUE_SIZE>
impl<const QUEUE_SIZE: usize> Send for ConstGenericQueue<QUEUE_SIZE>
impl<const QUEUE_SIZE: usize> Sync for ConstGenericQueue<QUEUE_SIZE>
impl<const QUEUE_SIZE: usize> Unpin for ConstGenericQueue<QUEUE_SIZE>
impl<const QUEUE_SIZE: usize> UnwindSafe for ConstGenericQueue<QUEUE_SIZE>
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