cushy::widgets::progress

Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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