pub struct Task {
pub label: String,
pub show: bool,
pub done: usize,
pub total: usize,
pub start: Instant,
}Fields§
§label: String§show: bool§done: usize§total: usize§start: InstantImplementations§
Source§impl Task
impl Task
pub fn new<S: Into<String>>(label: S) -> Self
pub fn with_total(self, total: usize) -> Self
pub fn update(&mut self, done: usize, total: usize)
pub fn increment(&mut self)
pub fn update_with_label<S: Into<String>>( &self, done: usize, total: usize, post_label: S, )
pub fn finish<S: Into<String>>(&self, post_label: S)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnwindSafe for Task
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