pub struct TaskScheduler { /* private fields */ }Implementations§
Source§impl TaskScheduler
impl TaskScheduler
pub fn new() -> Self
pub fn add_task(&mut self, task: Task)
pub fn add_tasks(&mut self, tasks: Vec<Task>)
pub fn get_next_task(&self) -> Option<Task>
pub fn get_tasks(&self) -> Vec<Task>
pub fn record_result(&self, result: TaskResult)
pub fn get_result(&self, task_id: usize) -> Option<TaskResult>
pub fn get_metrics(&self) -> ExecutionMetrics
pub fn update_metrics(&self, metrics: ExecutionMetrics)
pub fn task_count(&self) -> usize
pub fn completed_count(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskScheduler
impl RefUnwindSafe for TaskScheduler
impl Send for TaskScheduler
impl Sync for TaskScheduler
impl Unpin for TaskScheduler
impl UnsafeUnpin for TaskScheduler
impl UnwindSafe for TaskScheduler
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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