Struct indicatif::ProgressBar
[−]
[src]
pub struct ProgressBar { /* fields omitted */ }
A progress bar or spinner.
Methods
impl ProgressBar
[src]
pub fn new(len: u64) -> ProgressBar
[src]
Creates a new progress bar with a given length.
This progress bar by default draws directly to stdout.
[src]
Creates a completely hidden progress bar.
This progress bar still responds to API changes but it does not have a length or render in any way.
pub fn new_spinner() -> ProgressBar
[src]
Creates a new spinner.
This spinner by default draws directly to stdout. This adds the default spinner style to it.
pub fn set_style(&self, style: ProgressStyle)
[src]
Overrides the stored style.
pub fn tick(&self)
[src]
Manually ticks the spinner or progress bar.
This automatically happens on any other change to a progress bar.
pub fn inc(&self, delta: u64)
[src]
Advances the position of a progress bar by delta.
pub fn set_position(&self, pos: u64)
[src]
Sets the position of the progress bar.
pub fn set_length(&self, len: u64)
[src]
Sets the length of the progress bar.
pub fn set_prefix(&self, prefix: &str)
[src]
Sets the current prefix of the progress bar.
pub fn set_message(&self, msg: &str)
[src]
Sets the current message of the progress bar.
pub fn finish(&self)
[src]
Finishes the progress bar and leaves the current message.
pub fn finish_with_message(&self, msg: &str)
[src]
Finishes the progress bar and sets a message.
pub fn finish_and_clear(&self)
[src]
Finishes the progress bar and completely clears it.
pub fn set_draw_target(&self, target: ProgressDrawTarget)
[src]
Sets a different draw target for the progress bar.
This can be used to draw the progress bar to stderr for instance:
let pb = ProgressBar::new(100); pb.set_draw_target(ProgressDrawTarget::stderr());