pub struct AnimatedText<'a> { /* private fields */ }Expand description
An animated text widget with color effects
Displays text with animated color transitions, including:
- Pulse: Color oscillates between two values
- Wave: A highlight travels back and forth
- Rainbow: Colors cycle across the text
Implementations§
Source§impl<'a> AnimatedText<'a>
impl<'a> AnimatedText<'a>
Sourcepub fn new(text: &'a str, state: &'a AnimatedTextState) -> Self
pub fn new(text: &'a str, state: &'a AnimatedTextState) -> Self
Create a new animated text widget
Sourcepub fn style(self, style: AnimatedTextStyle) -> Self
pub fn style(self, style: AnimatedTextStyle) -> Self
Set the style
Sourcepub fn effect(self, effect: AnimatedTextEffect) -> Self
pub fn effect(self, effect: AnimatedTextEffect) -> Self
Set the effect directly
Sourcepub fn colors(self, primary: Color, secondary: Color) -> Self
pub fn colors(self, primary: Color, secondary: Color) -> Self
Set colors directly (primary and secondary)
Sourcepub fn display_width(&self) -> usize
pub fn display_width(&self) -> usize
Get the display width of the text
Trait Implementations§
Source§impl<'a> Clone for AnimatedText<'a>
impl<'a> Clone for AnimatedText<'a>
Source§fn clone(&self) -> AnimatedText<'a>
fn clone(&self) -> AnimatedText<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for AnimatedText<'a>
impl<'a> Debug for AnimatedText<'a>
Auto Trait Implementations§
impl<'a> Freeze for AnimatedText<'a>
impl<'a> RefUnwindSafe for AnimatedText<'a>
impl<'a> Send for AnimatedText<'a>
impl<'a> Sync for AnimatedText<'a>
impl<'a> Unpin for AnimatedText<'a>
impl<'a> UnwindSafe for AnimatedText<'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