Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* split each spinner into individual features (#17) * split into features (#15) * upaded documentation * readme changes --------- Co-authored-by: Haruki Jay Shimada <peaske16180@gmail.com>
- Loading branch information
1 parent
bcee5d6
commit e3ffc7e
Showing
10 changed files
with
884 additions
and
1,407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
use spinoff::{Color, Spinner, Spinners}; | ||
#![allow(unused_imports)] | ||
use spinoff::{spinners, Color, Spinner}; | ||
use std::{thread::sleep, time::Duration}; | ||
|
||
#[cfg(feature = "dots")] | ||
fn main() { | ||
let sp = Spinner::new(Spinners::Dots, "Loading...", Color::Blue); | ||
let sp = Spinner::new(spinners::Dots, "Loading...", Color::Blue); | ||
sleep(Duration::from_millis(8000)); | ||
sp.success("Done!"); | ||
} | ||
|
||
#[cfg(not(feature = "dots"))] | ||
fn main() { | ||
println!("This example requires the 'dots' feature to be enabled."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
use spinoff::{Color, Spinner, Spinners}; | ||
#![allow(unused_imports)] | ||
use spinoff::{spinners, Color, Spinner}; | ||
use std::{thread::sleep, time::Duration}; | ||
|
||
#[cfg(feature = "arc")] | ||
fn main() { | ||
let sp = Spinner::new(Spinners::Arc, "Loading...", Color::Blue); | ||
let sp = Spinner::new(spinners::Arc, "Loading...", Color::Blue); | ||
sleep(Duration::from_secs(5)); | ||
sp.stop_and_persist("🍕", "Pizza!"); | ||
} | ||
|
||
#[cfg(not(feature = "arc"))] | ||
fn main() { | ||
println!("This example requires the 'arc' feature to be enabled."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
use spinoff::{Spinner, Spinners, Streams}; | ||
#![allow(unused_imports)] | ||
use spinoff::{spinners, Spinner, Streams}; | ||
use std::{thread::sleep, time::Duration}; | ||
|
||
#[cfg(feature = "aesthetic")] | ||
fn main() { | ||
let sp = Spinner::new_with_stream(Spinners::Aesthetic, "Loading in stderr...", None, Streams::Stderr); | ||
let sp = Spinner::new_with_stream(spinners::Aesthetic, "Loading in stderr...", None, Streams::Stderr); | ||
sleep(Duration::from_millis(8000)); | ||
sp.success("Done!"); | ||
} | ||
|
||
#[cfg(not(feature = "aesthetic"))] | ||
fn main() { | ||
println!("This example requires the 'aesthetic' feature to be enabled."); | ||
} |
Oops, something went wrong.