pub struct Spinner<'a> { /* private fields */ }Expand description
A spinner widget for loading/processing indicators
Displays an animated spinner character with an optional label.
Implementations§
Source§impl<'a> Spinner<'a>
impl<'a> Spinner<'a>
Sourcepub fn new(state: &'a SpinnerState) -> Self
pub fn new(state: &'a SpinnerState) -> Self
Create a new spinner with the given state
Sourcepub fn frames(self, frames: SpinnerFrames) -> Self
pub fn frames(self, frames: SpinnerFrames) -> Self
Set the spinner frames
Sourcepub fn style(self, style: SpinnerStyle) -> Self
pub fn style(self, style: SpinnerStyle) -> Self
Set the style
Sourcepub fn label_position(self, position: LabelPosition) -> Self
pub fn label_position(self, position: LabelPosition) -> Self
Set the label position
Sourcepub fn display_width(&self) -> usize
pub fn display_width(&self) -> usize
Calculate the display width of the spinner (including label)
Trait 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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