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,

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for ProgressState

fn from(t: T) -> T

Returns the argument unchanged.

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

fn into(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<U> for ProgressState where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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