Trait indicatif::ProgressIterator [−][src]
pub trait ProgressIterator where
Self: Sized + Iterator, {
fn progress_with(self, progress: ProgressBar) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
;
fn try_progress(self) -> Option<ProgressBarIter<Self>> { ... }
fn progress(self) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
where
Self: ExactSizeIterator,
{ ... }
fn progress_count(self, len: u64) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
{ ... }
fn progress_with_style(self, style: ProgressStyle) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
where
Self: ExactSizeIterator,
{ ... }
}
Expand description
Wraps an iterator to display its progress.
Required methods
fn progress_with(self, progress: ProgressBar) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
fn progress_with(self, progress: ProgressBar) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
Notable traits for ProgressBarIter<W>
impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
Wrap an iterator with a custom progress bar.
Provided methods
fn try_progress(self) -> Option<ProgressBarIter<Self>>
fn try_progress(self) -> Option<ProgressBarIter<Self>>
Wrap an iterator with default styling. Uses Iterator::size_hint
to get length.
Returns Some(..)
only if size_hint.1
is Some
. If you want to create a progress bar
even if size_hint.1
returns None
use progress_count
or progress_with
instead.
fn progress(self) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
where
Self: ExactSizeIterator,
fn progress(self) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
where
Self: ExactSizeIterator,
Notable traits for ProgressBarIter<W>
impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
Wrap an iterator with default styling.
fn progress_count(self, len: u64) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
fn progress_count(self, len: u64) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
Notable traits for ProgressBarIter<W>
impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
Wrap an iterator with an explicit element count.
fn progress_with_style(self, style: ProgressStyle) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
where
Self: ExactSizeIterator,
fn progress_with_style(self, style: ProgressStyle) -> ProgressBarIter<Self>ⓘNotable traits for ProgressBarIter<W>impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
where
Self: ExactSizeIterator,
Notable traits for ProgressBarIter<W>
impl<W: Write> Write for ProgressBarIter<W>impl<R: Read> Read for ProgressBarIter<R>impl<S, T: Iterator<Item = S>> Iterator for ProgressBarIter<T> type Item = S;
Wrap an iterator with a progress bar and style it.