pub struct Scheduler { /* private fields */ }Expand description
Single-threaded scheduler that prioritizes “cancels” over schedule executions, hence multiple queues
Implementations§
Source§impl Scheduler
impl Scheduler
Sourcepub fn schedule(&self, entry: ScheduleEntry)
pub fn schedule(&self, entry: ScheduleEntry)
Schedules entry for execution(s)
Sourcepub fn cancel(&self, id: ScheduleEntryId)
pub fn cancel(&self, id: ScheduleEntryId)
Cancels future execution(s)
Sourcepub fn status(&self) -> SchedulerStatus
pub fn status(&self) -> SchedulerStatus
Returns the scheduler’s current status
Sourcepub fn entry_count(&self) -> u32
pub fn entry_count(&self) -> u32
Number of current entries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scheduler
impl !RefUnwindSafe for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl !UnwindSafe for Scheduler
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