Struct ProgressState

struct ProgressState { ... }

The state of a progress bar at a moment in time.

Implementations

impl ProgressState

fn is_finished(self: &Self) -> bool

Indicates that the progress bar finished.

fn fraction(self: &Self) -> f32

Returns the completion as a floating-point number between 0 and 1

fn eta(self: &Self) -> Duration

The expected ETA

fn duration(self: &Self) -> Duration

The expected total duration (that is, elapsed time + expected ETA)

fn per_sec(self: &Self) -> f64

The number of steps per second

fn elapsed(self: &Self) -> Duration
fn pos(self: &Self) -> u64
fn set_pos(self: &mut Self, pos: u64)
fn len(self: &Self) -> Option<u64>
fn set_len(self: &mut Self, len: u64)

impl Freeze for ProgressState

impl RefUnwindSafe for ProgressState

impl Send for ProgressState

impl Sync for ProgressState

impl Unpin for ProgressState

impl UnsafeUnpin for ProgressState

impl UnwindSafe for ProgressState

impl<T> Any for ProgressState

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ProgressState

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ProgressState

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for ProgressState

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for ProgressState

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for ProgressState

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for ProgressState

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>