Trait cushy::widgets::progress::Progressable

source ·
pub trait Progressable<T>: IntoReader<T> + Sized
where 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§

source

fn progress_bar(self) -> ProgressBar

Returns a new progress bar that displays progress from T::MIN to T::MAX.

source

fn progress_bar_to(self, max: impl IntoReadOnly<T::Value>) -> ProgressBar
where T::Value: PartialEq + Ranged + Send + Clone,

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.

source

fn progress_bar_between<Range>(self, range: Range) -> ProgressBar
where T::Value: Send, Range: IntoReadOnly<RangeInclusive<T::Value>>,

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.

Implementors§

source§

impl<T, U> Progressable<U> for T
where T: IntoReader<U> + Send, U: ProgressValue + Send,