[−][src]Trait progressing::Bar
Associated Types
type Progress
Required methods
fn bar_len(&self) -> usize
fn set_bar_len(&mut self, new_bar_len: usize)
Do not shorten the length before reprinting since the line will be overwritten, not cleared.
[========> ]
becomes [====>]==> ]
instead of [====>]
.
fn set(&mut self, new_progress: Self::Progress) -> &mut Self
Sets the progress to the given value
fn add(&mut self, delta: Self::Progress) -> &mut Self
Adds the given progress to the current progress
Provided methods
fn display(&self) -> String
Returns the printable progressbar.
fn write_to_stdout<S: Into<String>>(&self, msg: S) -> Result<(), String>
fn print(&self) -> Result<(), String>
Prints a progressbar using given progress.
Does not print a newline-character.
Use println(...)
for printing a newline-character.
Use reprint(...)
for overwriting the current stdout-line.
Will return error if writing to stdout
throws an error.
fn println(&self) -> Result<(), String>
Prints a progressbar using given progress.
In additon to print(...)
, this function prints a new line.
Use reprintln(...)
for overwriting the current stdout-line.
Will return error if writing to stdout
throws an error.
fn reprint(&self) -> Result<(), String>
Prints the current line again with progressbar using given progress.
Does not print a newline-character.
Use reprintln(...)
for reprinting with a newline-character.
Will return error if writing to stdout
throws an error.
fn reprintln(&self) -> Result<(), String>
Prints the current line again with progressbar using given progress.
In additon to reprint(...)
, this function prints a new line.
Use println(...)
for always printing a newline-character.
Will return error if writing to stdout
throws an error.
Implementors
impl Bar for BernoulliBar
[src]
type Progress = BernoulliProgress
fn bar_len(&self) -> usize
[src]
fn set_bar_len(&mut self, new_bar_len: usize)
[src]
fn set(&mut self, outcome: Self::Progress) -> &mut Self
[src]
fn add(&mut self, outcome: Self::Progress) -> &mut Self
[src]
impl Bar for ClampingBar
[src]
type Progress = f32
fn bar_len(&self) -> usize
[src]
fn set_bar_len(&mut self, new_bar_len: usize)
[src]
panics if length is < 3