Struct spinner::SpinnerBuilder
[−]
[src]
pub struct SpinnerBuilder { // some fields omitted }
The struct with which to create a Spinner, check out the crate documentation for some more details
Methods
impl SpinnerBuilder
fn new(msg: String) -> Self
Create a SpinnerBuilder, giving an original message
fn spinner(self, sp: Vec<&'static str>) -> Self
Customize the vector that can be used for the spinner, you can google something like 'ascii spinner' for some fun examples. Note though that you should make sure they all have the same length. And only one line.
fn step(self, st: Duration) -> Self
Customize the step between each update of the text. The default is 200ms
fn format<F>(self, f: F) -> Self where F: Fn(&str, &str) -> String + Send + 'static
Set the format closure that is to be used by the spinner, check out the complex_spinner example how this could be used.
fn start(self) -> SpinnerHandle
Start the thread that takes care of the Spinner and return immediately allowing you to load or do otherwise operations.