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) -> boolIndicates that the progress bar finished.
fn fraction(&self) -> f32Returns the completion as a floating-point number between 0 and 1
fn eta(&self) -> DurationThe expected ETA
fn duration(&self) -> DurationThe expected total duration (that is, elapsed time + expected ETA)
fn per_sec(&self) -> f64The number of steps per second
fn elapsed(&self) -> Durationfn pos(&self) -> u64fn 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) -> TReturns the argument unchanged.
impl<T, U> Into<U> for ProgressState
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses 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>