Struct ckb_db_migration::ProgressStyle
source · pub struct ProgressStyle { /* private fields */ }
Expand description
Controls the rendering style of progress bars
Implementations§
source§impl ProgressStyle
impl ProgressStyle
sourcepub fn default_bar() -> ProgressStyle
pub fn default_bar() -> ProgressStyle
Returns the default progress bar style for bars
sourcepub fn default_spinner() -> ProgressStyle
pub fn default_spinner() -> ProgressStyle
Returns the default progress bar style for spinners
sourcepub fn tick_chars(self, s: &str) -> ProgressStyle
pub fn tick_chars(self, s: &str) -> ProgressStyle
Sets the tick character sequence for spinners
sourcepub fn tick_strings(self, s: &[&str]) -> ProgressStyle
pub fn tick_strings(self, s: &[&str]) -> ProgressStyle
Sets the tick string sequence for spinners
sourcepub fn progress_chars(self, s: &str) -> ProgressStyle
pub fn progress_chars(self, s: &str) -> ProgressStyle
Sets the progress characters (filled, current, to do)
You can pass more then three for a more detailed display. All passed grapheme clusters need to be of equal width.
sourcepub fn template(self, s: &str) -> ProgressStyle
pub fn template(self, s: &str) -> ProgressStyle
Sets the template string for the progress bar
Review the list of template keys for more information.
sourcepub fn on_finish(self, finish: ProgressFinish) -> ProgressStyle
pub fn on_finish(self, finish: ProgressFinish) -> ProgressStyle
Sets the finish behavior for the progress bar
This behavior is invoked when ProgressBar
or
ProgressBarIter
completes and
ProgressBar::is_finished()
is false.
If you don’t want the progress bar to be automatically finished then
call on_finish(None)
.
sourcepub fn get_tick_char(&self, idx: u64) -> char
👎Deprecated since 0.13.0: Deprecated in favor of get_tick_str
pub fn get_tick_char(&self, idx: u64) -> char
Returns the tick char for a given number
sourcepub fn get_tick_str(&self, idx: u64) -> &str
pub fn get_tick_str(&self, idx: u64) -> &str
Returns the tick string for a given number
sourcepub fn get_final_tick_char(&self) -> char
👎Deprecated since 0.13.0: Deprecated in favor of get_final_tick_str
pub fn get_final_tick_char(&self) -> char
Returns the tick char for the finished state
sourcepub fn get_final_tick_str(&self) -> &str
pub fn get_final_tick_str(&self) -> &str
Returns the tick string for the finished state
sourcepub fn get_on_finish(&self) -> &ProgressFinish
pub fn get_on_finish(&self) -> &ProgressFinish
Returns the finish behavior
Trait Implementations§
source§impl Clone for ProgressStyle
impl Clone for ProgressStyle
source§fn clone(&self) -> ProgressStyle
fn clone(&self) -> ProgressStyle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ProgressStyle
impl RefUnwindSafe for ProgressStyle
impl Send for ProgressStyle
impl Sync for ProgressStyle
impl Unpin for ProgressStyle
impl UnwindSafe for ProgressStyle
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
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>
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>
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