pub struct ProgressBar { /* private fields */ }print only.Expand description
Handle for a progress bar (This is the internal state, the handle is Arc<ProgressBar>)
See Progress Bars
Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn child(self: &Arc<Self>, message: impl Into<String>) -> ProgressBarBuilder
pub fn child(self: &Arc<Self>, message: impl Into<String>) -> ProgressBarBuilder
Start building a child progress bar
Note that the child builder will keep this bar alive (displayed), even if the child is not spawned
Sourcepub fn done_with_message(self: Arc<Self>, message: &str)
pub fn done_with_message(self: Arc<Self>, message: &str)
Set the message to be printed and mark the bar as done
Sourcepub fn done_by_ref_with_message(&self, message: &str)
pub fn done_by_ref_with_message(&self, message: &str)
Set the message to be printed and mark the bar as done
Sourcepub fn set_done_message(&self, message: &str)
pub fn set_done_message(&self, message: &str)
Change the message to be printed when the bar is done. Useful if information is not available yet when the bar is spawned.
This does NOT mark the bar as done, use done_with_message
for that.
Sourcepub fn set_interrupted_message(&self, message: &str)
pub fn set_interrupted_message(&self, message: &str)
Change the message to be printed when the bar is interrupted. Useful if information is not available yet when the bar is spawned.
Sourcepub fn done(self: Arc<Self>)
pub fn done(self: Arc<Self>)
Mark the progress bar as done and drop the handle.
This needs to be called if the bar is unbounded. Otherwise, the bar will display in the interrupted state when dropped.
If the progress is finite, then interrupted state is automatically
determined (current != total)
Sourcepub fn done_by_ref(&self)
pub fn done_by_ref(&self)
Same as done, but does not drop the bar.