pub struct ProgressBar { /* private fields */ }Expand description
A progress bar.
Need (state): a progress bar.
Implementations§
Source§impl ProgressBar
impl ProgressBar
Sourcepub fn new(fraction: Option<f32>) -> Self
pub fn new(fraction: Option<f32>) -> Self
A bar at fraction (0 to 1); none: indeterminate (a segment
travelling along the track).
Sourcepub fn indeterminate() -> Self
pub fn indeterminate() -> Self
An indeterminate bar.
Sourcepub fn counts(done: u64, total: u64) -> Self
pub fn counts(done: u64, total: u64) -> Self
done of total items: AccessKit’s range is 0 to total, the
value text “done of total”.
Sourcepub fn label(self, label: impl Into<String>) -> Self
pub fn label(self, label: impl Into<String>) -> Self
Its accessible name (“Exporting 340 images”).
Sourcepub fn text(self, text: impl Into<String>) -> Self
pub fn text(self, text: impl Into<String>) -> Self
Its value as text (“12 of 340, about 2 minutes left”), for
screen readers and, with ProgressBar::caption, on screen.
pub fn tone(self, tone: Tone) -> Self
Sourcepub fn section(
self,
fraction: f32,
tone: Tone,
label: impl Into<String>,
) -> Self
pub fn section( self, fraction: f32, tone: Tone, label: impl Into<String>, ) -> Self
Adds a stacked section after the fill (failed, skipped): the fill keeps its fraction, the sections follow it.
pub fn size(self, size: BarSize) -> Self
Trait Implementations§
Source§impl Clone for ProgressBar
impl Clone for ProgressBar
Source§fn clone(&self) -> ProgressBar
fn clone(&self) -> ProgressBar
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgressBar
impl Debug for ProgressBar
Auto Trait Implementations§
impl Freeze for ProgressBar
impl RefUnwindSafe for ProgressBar
impl Send for ProgressBar
impl Sync for ProgressBar
impl Unpin for ProgressBar
impl UnsafeUnpin for ProgressBar
impl UnwindSafe for ProgressBar
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more