Skip to main content

spinner

Function spinner 

Source
pub fn spinner(message: &str, verbosity: Verbosity) -> ProgressBar
Expand description

Create a spinner for indeterminate operations.

Use when the total work amount is unknown or for quick operations.

§Arguments

  • message - Message to display next to the spinner
  • verbosity - Verbosity level to respect

§Returns

A configured spinner, or hidden spinner if progress shouldn’t be shown.

§Examples

use oxigaf_cli::progress;
use oxigaf_cli::verbosity::Verbosity;

let pb = progress::spinner("Downloading...", Verbosity::Normal);
// Do work
pb.finish_with_message("Done!");