pub struct Spinner {
pub states: SpinnerStates,
pub view_auto_step: bool,
/* private fields */
}Expand description
A textual spinner which step changes at each view() call (if manual_step is disabled).
Fields§
§states: SpinnerStates§view_auto_step: boolAutomatically call SpinnerStates::step in view.
This option might be removed in a future major version
Implementations§
Source§impl Spinner
impl Spinner
Sourcepub fn foreground(self, fg: Color) -> Self
pub fn foreground(self, fg: Color) -> Self
Set the main foreground color. This may get overwritten by individual text styles.
Sourcepub fn background(self, bg: Color) -> Self
pub fn background(self, bg: Color) -> Self
Set the main background color. This may get overwritten by individual text styles.
Sourcepub fn style(self, style: Style) -> Self
pub fn style(self, style: Style) -> Self
Set the main style. This may get overwritten by individual text styles.
This option will overwrite any previous foreground, background!
Sourcepub fn sequence<S: Into<String>>(self, s: S) -> Self
pub fn sequence<S: Into<String>>(self, s: S) -> Self
Set the sequence of characters to step through.
Sourcepub fn manual_step(self) -> Self
pub fn manual_step(self) -> Self
Disable automatically stepping the sequence in a view call.
Trait Implementations§
Source§impl Component for Spinner
impl Component for Spinner
Source§fn view(&mut self, render: &mut Frame<'_>, area: Rect)
fn view(&mut self, render: &mut Frame<'_>, area: Rect)
Based on the current properties and states, renders the component in the provided area frame.
Render can also mutate the component state if this is required
Source§fn query<'a>(&'a self, attr: Attribute) -> Option<QueryResult<'a>>
fn query<'a>(&'a self, attr: Attribute) -> Option<QueryResult<'a>>
Query attribute of component properties. Read more
Auto Trait Implementations§
impl Freeze for Spinner
impl !RefUnwindSafe for Spinner
impl Send for Spinner
impl Sync for Spinner
impl Unpin for Spinner
impl UnsafeUnpin for Spinner
impl !UnwindSafe for Spinner
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