#[repr(C)]pub struct Spinner {
pub size: isize,
pub color: ColorU,
pub track_color: ColorU,
pub spinner_style: CssPropertyWithConditionsVec,
}Expand description
An indeterminate busy-indicator ring. Stateless; renders a single styled
node. Static — the ring shows the spinner shape but does not rotate
(see the module-level TODO2).
Fields§
§size: isizeThe ring diameter, in logical px.
color: ColorUColour of the active (top) arc.
track_color: ColorUColour of the three inactive (“track”) sides.
spinner_style: CssPropertyWithConditionsVecThe computed inline style for the ring.
Implementations§
Source§impl Spinner
impl Spinner
Sourcepub fn with_size(size: isize) -> Self
pub fn with_size(size: isize) -> Self
Creates a new spinner with the given diameter (logical px) and the default colours.
Sourcepub fn set_size(&mut self, size: isize)
pub fn set_size(&mut self, size: isize)
Sets the ring diameter (logical px), recomputing the style.
Sourcepub fn with_spinner_size(self, size: isize) -> Self
pub fn with_spinner_size(self, size: isize) -> Self
Builder-style setter for the ring diameter.
Sourcepub fn with_color(self, color: ColorU) -> Self
pub fn with_color(self, color: ColorU) -> Self
Builder-style setter for the active-arc colour.
Sourcepub fn set_track_color(&mut self, track_color: ColorU)
pub fn set_track_color(&mut self, track_color: ColorU)
Sets the inactive “track” colour, recomputing the style.
Sourcepub fn with_track_color(self, track_color: ColorU) -> Self
pub fn with_track_color(self, track_color: ColorU) -> Self
Builder-style setter for the inactive “track” colour.
Sourcepub fn swap_with_default(&mut self) -> Self
pub fn swap_with_default(&mut self) -> Self
Replaces self with a default spinner and returns the original.
Trait Implementations§
impl Eq for Spinner
impl StructuralPartialEq for Spinner
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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