Struct ckb_db_migration::ProgressStyle
source · [−]pub struct ProgressStyle { /* private fields */ }
Expand description
Controls the rendering style of progress bars
Implementations
sourceimpl 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
Deprecated in favor of get_tick_str
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
Deprecated in favor of get_final_tick_str
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
sourceimpl Clone for ProgressStyle
impl Clone for ProgressStyle
sourcefn clone(&self) -> ProgressStyle
fn clone(&self) -> ProgressStyle
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ProgressStyle
impl Send for ProgressStyle
impl Sync for ProgressStyle
impl Unpin for ProgressStyle
impl UnwindSafe for ProgressStyle
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more