pub struct SimpleBar { /* private fields */ }
Expand description
A simple progress bar implementation, based off that of the progress crates progresbar
Implementations
Trait Implementations
sourceimpl IsBar for SimpleBar
impl IsBar for SimpleBar
sourcefn display(&mut self) -> String
fn display(&mut self) -> String
Some implementation details:
starts with “\r” and has no end char
if it cannot get the real term size, uses 81 as the size
sourcefn done(&mut self)
fn done(&mut self)
Finishes the Bar
, allowing it to be finalized and dropped by the manager according to
the close method returned by close_method
.
The bar should not be used after this is called. Read more
sourcefn close_method(&self) -> BarCloseMethod
fn close_method(&self) -> BarCloseMethod
Returns how the bar should be handled by the BarManager
after done
is called Read more
sourceimpl IteratorProgress for SimpleBar
impl IteratorProgress for SimpleBar
sourcefn set_progress(&mut self, progress: usize)
fn set_progress(&mut self, progress: usize)
Sets the current progress (number of items iterated through)
sourcefn set_size_hint(&mut self, hint: usize)
fn set_size_hint(&mut self, hint: usize)
sets a hint for the maximum value set_progress
will ever reach Read more
Auto Trait Implementations
impl RefUnwindSafe for SimpleBar
impl Send for SimpleBar
impl Sync for SimpleBar
impl Unpin for SimpleBar
impl UnwindSafe for SimpleBar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more