Struct sortery::messages::ProgressBar[][src]

pub struct ProgressBar {
    pub completed_message: String,
    pub message: String,
    pub total: usize,
}
Expand description

The command-line progress bar used when sorting.

  • completed_message is a String of the message to be printed when ProgressBar::complete is called.

  • message is a String to be shown while the progress bar is between start and finish, for example "Still working..."

    total is a usize representing the total value of the progress bar. Bar pogress and percent completed are calculated using total. For example, if you are going to sort 20 files, you would pass 20 to total, and the progress bar would know to show 50% when set_progress(10) is called.

Fields

completed_message: Stringmessage: Stringtotal: usize

Implementations

Print the updated progress bar, with completed number of items completed out of the total. Automatically calculates percent and bar size.

Print the full progress bar, along with completed_message.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.