[][src]Struct prodash::tree::Progress

pub struct Progress {
    pub step: ProgressStep,
    pub done_at: Option<ProgressStep>,
    pub unit: Option<&'static str>,
    pub state: ProgressState,
}

Progress associated with some item in the progress tree.

Fields

step: ProgressStep

The amount of progress currently made

done_at: Option<ProgressStep>

The step at which no further progress has to be made.

If unset, the progress is unbounded.

unit: Option<&'static str>

The unit associated with the progress.

state: ProgressState

Whether progress can be made or not

Methods

impl Progress[src]

pub fn fraction(&self) -> Option<f32>[src]

Returns a number between Some(0.0) and Some(1.0), or None if the progress is unbounded.

A task half done would return Some(0.5).

Trait Implementations

impl Clone for Progress[src]

impl Copy for Progress[src]

impl Debug for Progress[src]

impl Default for Progress[src]

impl Eq for Progress[src]

impl Hash for Progress[src]

impl Ord for Progress[src]

impl PartialEq<Progress> for Progress[src]

impl PartialOrd<Progress> for Progress[src]

impl StructuralEq for Progress[src]

impl StructuralPartialEq for Progress[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.