Struct demand::SpinnerStyle
source · pub struct SpinnerStyle {
pub frames: Vec<&'static str>,
pub fps: Duration,
}
Expand description
The style of the spinner
§Example
use demand::SpinnerStyle;
use std::time::Duration;
let dots_style = SpinnerStyle::dots();
let custom_style = SpinnerStyle {
frames: vec![" ", ". ", "..", "..."],
fps: Duration::from_millis(1000 / 10),
};
Fields§
§frames: Vec<&'static str>
The characters to use as frames for the spinner
fps: Duration
The frames per second of the spinner
Usually represented as a fraction of a second in milliseconds for example Duration::from_millis(1000/10)
which would be 10 frames per second
Implementations§
Auto Trait Implementations§
impl Freeze for SpinnerStyle
impl RefUnwindSafe for SpinnerStyle
impl Send for SpinnerStyle
impl Sync for SpinnerStyle
impl Unpin for SpinnerStyle
impl UnwindSafe for SpinnerStyle
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