We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
with_finish
ProgressBarIter
1 parent a81fd6c commit bd320a1Copy full SHA for bd320a1
src/iter.rs
@@ -12,6 +12,7 @@ use std::time::Duration;
12
use tokio::io::{ReadBuf, SeekFrom};
13
14
use crate::progress_bar::ProgressBar;
15
+use crate::state::ProgressFinish;
16
use crate::style::ProgressStyle;
17
18
/// Wraps an iterator to display its progress.
@@ -103,6 +104,14 @@ impl<T> ProgressBarIter<T> {
103
104
self.progress = self.progress.with_elapsed(elapsed);
105
self
106
}
107
+
108
+ /// Builder-like function for setting underlying progress bar's finish behavior.
109
+ ///
110
+ /// See [ProgressBar::with_finish].
111
+ pub fn with_finish(mut self, finish: ProgressFinish) -> Self {
112
+ self.progress = self.progress.with_finish(finish);
113
+ self
114
+ }
115
116
117
impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> {
0 commit comments