[][src]Enum prgrs::Length

pub enum Length {
    Absolute(usize),
    Proportional(f32),
}

Use this struct to set the length of the progress debug_assert!

Proportional (better use this when possible)

When using Proportional values below 0. are rounded to 0. and above 1. are rounded to 1.

A value of 0. means the progress bar will have a single step

A value of 1. will fill make the progress bar fit the entire width of the screen

Absolute (use carful)

When using Absolute you specify the total length of the bar including the percentage count and parentheses

Careful values that are larger than the terminal will NOT be handled in a special manner, which will probably lead to glitches

values, that would make make the bar smaller than a single step however like negative values or for example 2 are ignored and the bar will have a single steps

Variants

Absolute(usize)
Proportional(f32)

Auto Trait Implementations

impl RefUnwindSafe for Length

impl Send for Length

impl Sync for Length

impl Unpin for Length

impl UnwindSafe for Length

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.