Struct ProgressStyle

struct ProgressStyle { ... }

Implementations

impl ProgressStyle

fn default_bar() -> Self

Returns the default progress bar style for bars

fn default_spinner() -> Self

Returns the default progress bar style for spinners

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.

fn tick_chars(self: Self, s: &str) -> Self

Sets the tick character sequence for spinners

Note that the last character is used as the [final tick string][Self::get_final_tick_str()]. At least two characters are required to provide a non-final and final state.

fn tick_strings(self: Self, s: &[&str]) -> Self

Sets the tick string sequence for spinners

Note that the last string is used as the [final tick string][Self::get_final_tick_str()]. At least two strings are required to provide a non-final and final state.

fn progress_chars(self: Self, s: &str) -> Self

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.

fn with_key<S: ProgressTracker + 'static>(self: Self, key: &'static str, f: S) -> Self

Adds a custom key that owns a ProgressTracker to the template

fn template(self: Self, s: &str) -> Result<Self, TemplateError>

Sets the template string for the progress bar

Review the list of template keys for more information.

fn get_tick_str(self: &Self, idx: u64) -> &str

Returns the tick string for a given number

fn get_final_tick_str(self: &Self) -> &str

Returns the tick string for the finished state

impl Clone for ProgressStyle

fn clone(self: &Self) -> ProgressStyle

impl Freeze for ProgressStyle

impl RefUnwindSafe for ProgressStyle

impl Send for ProgressStyle

impl Sync for ProgressStyle

impl Unpin for ProgressStyle

impl UnwindSafe for ProgressStyle

impl<T> Any for ProgressStyle

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ProgressStyle

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ProgressStyle

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for ProgressStyle

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for ProgressStyle

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for ProgressStyle

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T, U> Into for ProgressStyle

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for ProgressStyle

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for ProgressStyle

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>