1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
use ;
/// Creates a spinner-style progress bar with a custom message.
///
/// This function initializes a `ProgressBar` in spinner mode, displaying a green spinning animation
/// alongside the provided message. It is suitable for tasks with indeterminate duration.
///
/// # Arguments
///
/// * `message` - A string slice to display next to the spinner.
///
/// # Returns
///
/// Returns a configured `ProgressBar` instance in spinner mode with the specified message.
///
/// # Examples
///
/// ```
/// let spinner = create_spinner("Processing...");
/// // Displays a green spinner with "Processing..." until finished
/// spinner.finish_with_message("Done!");
/// ```
/// Creates a bar-style progress bar with a custom message and length.
///
/// This function initializes a `ProgressBar` in bar mode, showing a cyan/blue progress bar, position,
/// total length, and the provided message. It is suitable for tasks with a known number of steps.
///
/// # Arguments
///
/// * `len` - The total number of steps for the progress bar (u64).
/// * `message` - A string slice to display next to the progress bar.
///
/// # Returns
///
/// Returns a configured `ProgressBar` instance in bar mode with the specified length and message.
///
/// # Examples
///
/// ```
/// let bar = create_bar(100, "Scanning files...");
/// // Displays a progress bar with "Scanning files..."
/// for _ in 0..100 {
/// bar.inc(1);
/// }
/// bar.finish_with_message("Scan complete!");
/// ```