Struct sans_io_runtime::TaskSwitcher
source · 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)
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