Struct indicatif::style::ProgressStyle
source · pub struct ProgressStyle { /* private fields */ }
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() -> Self
pub fn default_spinner() -> Self
Returns the default progress bar style for spinners
sourcepub fn with_template(template: &str) -> Result<Self, TemplateError>
pub fn with_template(template: &str) -> Result<Self, TemplateError>
Sets the template string for the progress bar
Review the list of template keys for more information.
sourcepub fn tick_chars(self, s: &str) -> ProgressStyle
pub fn tick_chars(self, s: &str) -> ProgressStyle
Sets the tick character sequence for spinners
Note that the last character is used as the final tick string. At least two characters are required to provide a non-final and final state.
sourcepub fn tick_strings(self, s: &[&str]) -> ProgressStyle
pub fn tick_strings(self, s: &[&str]) -> ProgressStyle
Sets the tick string sequence for spinners
Note that the last string is used as the final tick string. At least two strings are required to provide a non-final and final state.
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 than three for a more detailed display. All passed grapheme clusters need to be of equal width.
sourcepub fn with_key<S: ProgressTracker + 'static>(
self,
key: &'static str,
f: S,
) -> ProgressStyle
pub fn with_key<S: ProgressTracker + 'static>( self, key: &'static str, f: S, ) -> ProgressStyle
Adds a custom key that owns a ProgressTracker
to the template
sourcepub fn template(self, s: &str) -> Result<ProgressStyle, TemplateError>
pub fn template(self, s: &str) -> Result<ProgressStyle, TemplateError>
Sets the template string for the progress bar
Review the list of template keys for more information.
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_str(&self) -> &str
pub fn get_final_tick_str(&self) -> &str
Returns the tick string for the finished state
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)