Struct ProgressState

#[non_exhaustive]
pub struct ProgressState { /* private fields */ }

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

Implementations

impl ProgressState

fn is_finished(&self) -> bool

Indicates that the progress bar finished.

fn fraction(&self) -> f32

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

fn eta(&self) -> Duration

The expected ETA

fn duration(&self) -> Duration

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

fn per_sec(&self) -> f64

The number of steps per second

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

Auto Trait Implementations

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

Blanket Implementations

impl<T> Any for ProgressState where T: 'static + ?Sized,

impl<T> Borrow<T> for ProgressState where T: ?Sized,

impl<T> BorrowMut<T> for ProgressState where T: ?Sized,

impl<T> From<T> for ProgressState

impl<T, U> Into<U> for ProgressState where U: From<T>,

impl<T, U> TryFrom<U> for ProgressState where U: Into<T>,

impl<T, U> TryInto<U> for ProgressState where U: TryFrom<T>,