cushy::widgets::progress

Trait ProgressValue

source
pub trait ProgressValue: 'static {
    type Value;

    // Required method
    fn to_progress(
        &self,
        range: Option<RangeInclusive<&Self::Value>>,
    ) -> Progress;
}
Expand description

A value that can be used in a progress indicator.

Required Associated Types§

source

type Value

The type that progress is ranged over.

Required Methods§

source

fn to_progress(&self, range: Option<RangeInclusive<&Self::Value>>) -> Progress

Converts this value to a progress using the range given, if provided. If no range is provided, the full range of the type should be considered.

Implementations on Foreign Types§

source§

impl<T> ProgressValue for Option<T>
where T: Ranged + PercentBetween + 'static,

Implementors§

source§

impl<T> ProgressValue for Progress<T>
where T: Ranged + PercentBetween + 'static,

source§

type Value = T

source§

impl<T> ProgressValue for T
where T: Ranged + PercentBetween + 'static,

source§

type Value = T