Struct ProgressStyle

pub struct ProgressStyle { /* private fields */ }

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, 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, 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, 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, key: &'static str, f: S) -> Self

Adds a custom key that owns a ProgressTracker to the template

fn template(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, idx: u64) -> &str

Returns the tick string for a given number

fn get_final_tick_str(&self) -> &str

Returns the tick string for the finished state

Trait Implementations

impl Clone for ProgressStyle

fn clone(&self) -> ProgressStyle

Auto Trait Implementations

impl !RefUnwindSafe for ProgressStyle

impl !UnwindSafe for ProgressStyle

impl Freeze for ProgressStyle

impl Send for ProgressStyle

impl Sync for ProgressStyle

impl Unpin for ProgressStyle

impl UnsafeUnpin for ProgressStyle

Blanket Implementations

impl<T> Any for ProgressStyle where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ProgressStyle where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ProgressStyle where T: ?Sized,

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

impl<T> CloneToUninit for ProgressStyle where T: Clone,

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

impl<T> From<T> for ProgressStyle

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for ProgressStyle where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for ProgressStyle where U: From<T>,

fn into(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<U> for ProgressStyle where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ProgressStyle where U: TryFrom<T>,

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