pub trait Count {
// Required methods
fn set(&self, step: usize);
fn step(&self) -> usize;
fn inc_by(&self, step: usize);
fn counter(&self) -> Arc<Atomic<usize>>;
// Provided method
fn inc(&self) { ... }
}Available on crate feature
progress only.Expand description
A thread-safe read-only counter, with unknown limits.
Required Methods§
Sourcefn set(&self, step: usize)
fn set(&self, step: usize)
Set the current progress to the given step. The cost of this call is negligible,
making manual throttling not necessary.
Note: that this call has no effect unless init(…) was called before.