#[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 UnsafeUnpin 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