pub struct PriorityScheduler { /* private fields */ }Expand description
Priority-based scheduler with advanced features
Implementations§
Source§impl PriorityScheduler
impl PriorityScheduler
Sourcepub fn new(config: SchedulerConfig) -> Self
pub fn new(config: SchedulerConfig) -> Self
Create a new priority-based scheduler
Trait Implementations§
Source§impl TaskScheduler for PriorityScheduler
impl TaskScheduler for PriorityScheduler
Source§fn schedule_task(&mut self, task: ExecutionTask) -> SklResult<TaskHandle>
fn schedule_task(&mut self, task: ExecutionTask) -> SklResult<TaskHandle>
Schedule a single task
Source§fn schedule_batch(
&mut self,
tasks: Vec<ExecutionTask>,
) -> SklResult<Vec<TaskHandle>>
fn schedule_batch( &mut self, tasks: Vec<ExecutionTask>, ) -> SklResult<Vec<TaskHandle>>
Schedule multiple tasks as a batch
Source§fn cancel_task(&mut self, handle: TaskHandle) -> SklResult<()>
fn cancel_task(&mut self, handle: TaskHandle) -> SklResult<()>
Cancel a scheduled task
Source§fn get_status(&self) -> SchedulerStatus
fn get_status(&self) -> SchedulerStatus
Get current scheduler status
Source§fn update_config(&mut self, config: SchedulerConfig) -> SklResult<()>
fn update_config(&mut self, config: SchedulerConfig) -> SklResult<()>
Update scheduler configuration
Source§fn get_next_task(&mut self) -> Option<ExecutionTask>
fn get_next_task(&mut self) -> Option<ExecutionTask>
Get next task to execute (if any)
Source§fn get_metrics(&self) -> SchedulingMetrics
fn get_metrics(&self) -> SchedulingMetrics
Get scheduling metrics
Auto Trait Implementations§
impl Freeze for PriorityScheduler
impl !RefUnwindSafe for PriorityScheduler
impl Send for PriorityScheduler
impl Sync for PriorityScheduler
impl Unpin for PriorityScheduler
impl !UnwindSafe for PriorityScheduler
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more