download/
download.rs

1use loading::Loading;
2use std::thread;
3use std::time::Duration;
4
5fn main() {
6    let loading = Loading::default();
7
8    for i in 0..100 {
9        loading.text(format!("Download 'loading.rar' {}%", i));
10        thread::sleep(Duration::from_millis(30));
11    }
12
13    loading.fail("Download 'loading.rar' failed");
14
15    for i in 0..100 {
16        loading.text(format!("Download 'loading.zip' {}%", i));
17        thread::sleep(Duration::from_millis(30));
18    }
19
20    loading.success("Download 'loading.zip' successfully");
21
22    loading.end();
23}