Trait cushy::widgets::progress::Progressable
source · pub trait Progressable<T>: IntoReader<T> + Sizedwhere
T: ProgressValue + Send,{
// Provided methods
fn progress_bar(self) -> ProgressBar { ... }
fn progress_bar_to(self, max: impl IntoReadOnly<T::Value>) -> ProgressBar
where T::Value: PartialEq + Ranged + Send + Clone { ... }
fn progress_bar_between<Range>(self, range: Range) -> ProgressBar
where T::Value: Send,
Range: IntoReadOnly<RangeInclusive<T::Value>> { ... }
}
Expand description
A value that can be used in a progress indicator.
Provided Methods§
sourcefn progress_bar(self) -> ProgressBar
fn progress_bar(self) -> ProgressBar
Returns a new progress bar that displays progress from T::MIN
to
T::MAX
.
sourcefn progress_bar_to(self, max: impl IntoReadOnly<T::Value>) -> ProgressBar
fn progress_bar_to(self, max: impl IntoReadOnly<T::Value>) -> ProgressBar
Returns a new progress bar that displays progress from T::MIN
to
max
. The maximum value can be either a T
or an Option<T>
. If
None
is the maximum value, an indeterminant progress bar will be
displayed.
sourcefn progress_bar_between<Range>(self, range: Range) -> ProgressBar
fn progress_bar_between<Range>(self, range: Range) -> ProgressBar
Returns a new progress bar that displays progress over the specified
range
of T
. The range can be either a T..=T
or an Option<T>
. If
None
is specified as the range, an indeterminant progress bar will be
displayed.
Object Safety§
This trait is not object safe.