Trait stati::prelude::__stati_IsBar
source · [−]pub trait __stati_IsBar {
type Progress;
type Args;
fn new(job_name: String, args: Self::Args) -> Self
where
Self: Sized;
fn done(&mut self);
fn is_done(&self) -> bool;
fn set_progress(&mut self, progress: Self::Progress);
fn set_name(&mut self, job_name: String);
fn display(&mut self) -> String;
fn close_method(&self) -> BarCloseMethod;
}
Expand description
Functions that a progress bar should implement,
like SimpleBar
Associated Types
The unit that is passed to IsBar::set_progress
for example, if the bar was a precentage done, then this could be a usize
Arguments that are passed to IsBar::new
Required methods
Crate a new Bar
with the provided name,
and a progress level of zero
Finishes the Bar
, allowing it to be finalized and dropped by the manager.
the bar should not be used after this is called
Checks if the Bar
is done (IsBar::done
as been called)
fn set_progress(&mut self, progress: Self::Progress)
fn set_progress(&mut self, progress: Self::Progress)
Sets the progress level of the Bar
Formats the Bar
into a string. this is generaly only used by the BarManager