pub struct Task { /* private fields */ }Expand description
A single tracked task. Mirrors rich.progress.Task; read-only outside
Progress.
Implementations§
Source§impl Task
impl Task
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
The description (console markup).
Sourcepub fn elapsed(&self) -> Option<f64>
pub fn elapsed(&self) -> Option<f64>
Seconds since the task started (to its stop time, if stopped).
Sourcepub fn finished_time(&self) -> Option<f64>
pub fn finished_time(&self) -> Option<f64>
The elapsed time recorded when the task finished.
Sourcepub fn percentage(&self) -> f64
pub fn percentage(&self) -> f64
The completion percentage, clamped to 0–100 (0 without a total).
Sourcepub fn speed(&self) -> Option<f64>
pub fn speed(&self) -> Option<f64>
Steps per second over the sample window, or None without enough samples.
Sourcepub fn time_remaining(&self) -> Option<f64>
pub fn time_remaining(&self) -> Option<f64>
Estimated seconds remaining (rounded up), 0 once finished.
Auto Trait Implementations§
impl !RefUnwindSafe for Task
impl !UnwindSafe for Task
impl Freeze for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin 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