summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-12-02 14:06:58 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-12-02 14:23:50 +0100
commitd70fc03ca8e6763bddb0af9e854a6d1734a9f7b5 (patch)
tree117ea7c0fe50157d313d95a3b829ec95b175df2d
parent2b804658727c2c78d6ffdc2836924b18d2efe792 (diff)
Add doc for helper type
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--src/commands/source/download.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/commands/source/download.rs b/src/commands/source/download.rs
index f8d5a95..b5223cf 100644
--- a/src/commands/source/download.rs
+++ b/src/commands/source/download.rs
@@ -30,7 +30,15 @@ use crate::repository::Repository;
use crate::source::*;
use crate::util::progress::ProgressBars;
-
+/// A wrapper around the indicatif::ProgressBar
+///
+/// A wrapper around the indicatif::ProgressBar that is used to synchronize status information from
+/// the individual download jobs to the progress bar that is used to display download progress to
+/// the user.
+///
+/// The problem this helper solves is that we only have one status bar for all downloads, and all
+/// download tasks must be able to increase the number of bytes received, for example, (that is
+/// displayed in the status message) but in a sync way.
#[derive(Clone)]
struct ProgressWrapper {
download_count: u64,