pub struct TaskSwitcher { /* private fields */ }
Implementations§
Source§impl TaskSwitcher
impl TaskSwitcher
pub fn new(len: usize) -> Self
pub fn set_tasks(&mut self, tasks: usize)
pub fn tasks(&self) -> usize
Sourcepub fn current(&mut self) -> Option<usize>
pub fn current(&mut self) -> Option<usize>
Returns the current index of the task group, if it’s not finished. Otherwise, returns None.
pub fn flag_all(&mut self)
Sourcepub fn finished<I: Into<usize>>(&mut self, index: I)
pub fn finished<I: Into<usize>>(&mut self, index: I)
Flag that the current task group is finished.
pub fn flag_task<I: Into<usize>>(&mut self, index: I)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskSwitcher
impl RefUnwindSafe for TaskSwitcher
impl Send for TaskSwitcher
impl Sync for TaskSwitcher
impl Unpin for TaskSwitcher
impl UnwindSafe for TaskSwitcher
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