pub struct ScheduleQueue { /* private fields */ }Expand description
Queue of tasks ordered by due time.
Implementations§
Source§impl ScheduleQueue
impl ScheduleQueue
pub fn new() -> Self
pub fn schedule_once(&mut self, name: &str, due_at: u64) -> u64
pub fn schedule_repeating( &mut self, name: &str, due_at: u64, interval: u64, ) -> u64
pub fn advance(&mut self, dt: u64) -> Vec<ScheduleTask>
pub fn cancel(&mut self, id: u64) -> bool
pub fn set_enabled(&mut self, id: u64, enabled: bool) -> bool
pub fn task_count(&self) -> usize
pub fn now(&self) -> u64
pub fn fired_count(&self) -> u64
pub fn next_due(&self) -> Option<u64>
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn has_task(&self, id: u64) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScheduleQueue
impl RefUnwindSafe for ScheduleQueue
impl Send for ScheduleQueue
impl Sync for ScheduleQueue
impl Unpin for ScheduleQueue
impl UnsafeUnpin for ScheduleQueue
impl UnwindSafe for ScheduleQueue
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