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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more