Struct indicatif::ProgressState
source · #[non_exhaustive]pub struct ProgressState { /* private fields */ }
Expand description
The state of a progress bar at a moment in time.
Implementations§
source§impl ProgressState
impl ProgressState
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Indicates that the progress bar finished.
sourcepub fn fraction(&self) -> f32
pub fn fraction(&self) -> f32
Returns the completion as a floating-point number between 0 and 1
sourcepub fn duration(&self) -> Duration
pub fn duration(&self) -> Duration
The expected total duration (that is, elapsed time + expected ETA)
pub fn elapsed(&self) -> Duration
pub fn pos(&self) -> u64
pub fn set_pos(&mut self, pos: u64)
pub fn len(&self) -> Option<u64>
pub 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 UnwindSafe for ProgressState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more