pub struct Progress {
pub total: usize,
/* private fields */
}Fields§
§total: usizeImplementations§
Source§impl Progress
impl Progress
pub fn new(total: usize, interval: ProgressInterval) -> Progress
pub fn set_prefix(&mut self, msg: String)
Sourcepub fn set_autoprint(&mut self, enabled: bool)
pub fn set_autoprint(&mut self, enabled: bool)
true causes Progress to print to stdout, false causes it to not print.
Sourcepub fn set_same_line(&mut self, same_line: bool)
pub fn set_same_line(&mut self, same_line: bool)
Print updates on the same line in the terminal, as a typical progress bar would. In some CI environments (like AWS CodeBuild) this should be disabled in order for progress updates to appear.
Sourcepub fn set(&mut self, new_current: usize) -> bool
pub fn set(&mut self, new_current: usize) -> bool
Assign a value to the current amount.
Returns true if a new line should be printed based on the chosen interval.
Sourcepub fn inc(&mut self) -> bool
pub fn inc(&mut self) -> bool
Increment the current count by 1.
Returns true if a new line should be printed based on the chosen interval.
Sourcepub fn current_count(&self) -> usize
pub fn current_count(&self) -> usize
Get the current count.
pub fn finish_msg(&self) -> String
Auto Trait Implementations§
impl Freeze for Progress
impl RefUnwindSafe for Progress
impl Send for Progress
impl Sync for Progress
impl Unpin for Progress
impl UnsafeUnpin for Progress
impl UnwindSafe for Progress
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