pub struct SubTaskSet { /* private fields */ }Expand description
A collection of sub-tasks belonging to a parent task.
Implementations§
Source§impl SubTaskSet
impl SubTaskSet
pub fn new() -> Self
pub fn add(&mut self, name: &str, weight: f32)
pub fn set_running(&mut self, name: &str) -> bool
pub fn set_progress(&mut self, name: &str, progress: f32) -> bool
pub fn set_done(&mut self, name: &str) -> bool
pub fn set_failed(&mut self, name: &str, reason: &str) -> bool
pub fn set_skipped(&mut self, name: &str) -> bool
pub fn get(&self, name: &str) -> Option<&SubTask>
Sourcepub fn overall_progress(&self) -> f32
pub fn overall_progress(&self) -> f32
Weighted overall progress (0.0..=1.0).
pub fn done_count(&self) -> usize
pub fn failed_count(&self) -> usize
pub fn pending_count(&self) -> usize
pub fn task_count(&self) -> usize
pub fn all_done(&self) -> bool
pub fn has_failures(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SubTaskSet
impl RefUnwindSafe for SubTaskSet
impl Send for SubTaskSet
impl Sync for SubTaskSet
impl Unpin for SubTaskSet
impl UnsafeUnpin for SubTaskSet
impl UnwindSafe for SubTaskSet
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