create_progress_bar

Function create_progress_bar 

Source
pub fn create_progress_bar(total: u64, message: &str) -> ProgressBar
Expand description

シンプルなプログレスバーを作成

単純な進捗表示が必要な場合の便利関数。

§引数

  • total - 総数
  • message - 表示メッセージ

§戻り値

ProgressBarインスタンス

§使用例

use backup_suite::ui::progress::create_progress_bar;

let pb = create_progress_bar(100, "処理中");
for _ in 0..100 {
    pb.inc(1);
}
pb.finish_with_message("完了");