##// END OF EJS Templates
rust: add `Progress` trait for progress bars...
rust: add `Progress` trait for progress bars This will be used in the next few changes to introduce a progress bar for the `hg update` fastpath.

File last commit:

r52934:3ae7c43a default
r52934:3ae7c43a default
Show More
progress.rs
11 lines | 454 B | application/rls-services+xml | RustLexer
//! Progress-bar related things
/// A generic determinate progress bar trait
pub trait Progress: Send + Sync + 'static {
/// Set the current position and optionally the total
fn update(&self, pos: u64, total: Option<u64>);
/// Increment the current position and optionally the total
fn increment(&self, step: u64, total: Option<u64>);
/// Declare that progress is over and the progress bar should be deleted
fn complete(self);
}