Struct cursive::utils::Counter [−][src]
pub struct Counter(pub Arc<AtomicUsize>);
Atomic counter used by ProgressBar
.
Methods
impl Counter
[src]
impl Counter
pub fn new(value: usize) -> Self
[src]
pub fn new(value: usize) -> Self
Creates a new Counter
starting with the given value.
pub fn get(&self) -> usize
[src]
pub fn get(&self) -> usize
Retrieves the current progress value.
pub fn set(&self, value: usize)
[src]
pub fn set(&self, value: usize)
Sets the current progress value.
pub fn tick(&self, ticks: usize)
[src]
pub fn tick(&self, ticks: usize)
Increase the current progress by ticks
.