diff -r 7c105b953ca4 -r 3ae7c43ad8aa rust/hg-core/src/progress.rs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rust/hg-core/src/progress.rs Mon Sep 30 16:02:30 2024 +0200 @@ -0,0 +1,11 @@ +//! 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); + /// Increment the current position and optionally the total + fn increment(&self, step: u64, total: Option); + /// Declare that progress is over and the progress bar should be deleted + fn complete(self); +}