pub struct Spinner<'a> {
pub title: String,
pub style: &'a SpinnerStyle,
pub theme: &'a Theme,
/* private fields */
}Expand description
Show a spinner
§Example
use demand::{Spinner,SpinnerStyle};
use std::time::Duration;
use std::thread::sleep;
let spinner = Spinner::new("Loading data...")
.style(&SpinnerStyle::line())
.run(|| {
sleep(Duration::from_secs(2));
})
.expect("error running spinner");Fields§
§title: String§style: &'a SpinnerStyle§theme: &'a ThemeThe colors/style of the spinner
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Spinner<'a>
impl<'a> RefUnwindSafe for Spinner<'a>
impl<'a> Send for Spinner<'a>
impl<'a> Sync for Spinner<'a>
impl<'a> Unpin for Spinner<'a>
impl<'a> UnwindSafe for Spinner<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more