pub struct AnimatedTextStyle {
pub effect: AnimatedTextEffect,
pub primary_color: Color,
pub secondary_color: Color,
pub modifiers: Modifier,
pub wave_width: usize,
pub background: Option<Color>,
pub rainbow_colors: Vec<Color>,
}Expand description
Style configuration for animated text
Fields§
§effect: AnimatedTextEffectAnimation effect type
primary_color: ColorPrimary/base color
secondary_color: ColorSecondary color (for pulse/wave effects)
modifiers: ModifierText modifiers (bold, italic, etc.)
wave_width: usizeWidth of the wave highlight (in characters)
background: Option<Color>Background color (optional)
rainbow_colors: Vec<Color>Rainbow colors for rainbow effect
Implementations§
Source§impl AnimatedTextStyle
impl AnimatedTextStyle
Sourcepub fn gradient_shift(start: Color, end: Color) -> Self
pub fn gradient_shift(start: Color, end: Color) -> Self
Create a gradient shift effect style
Sourcepub fn effect(self, effect: AnimatedTextEffect) -> Self
pub fn effect(self, effect: AnimatedTextEffect) -> Self
Set the animation effect
Sourcepub fn primary_color(self, color: Color) -> Self
pub fn primary_color(self, color: Color) -> Self
Set the primary color
Sourcepub fn secondary_color(self, color: Color) -> Self
pub fn secondary_color(self, color: Color) -> Self
Set the secondary color
Sourcepub fn wave_width(self, width: usize) -> Self
pub fn wave_width(self, width: usize) -> Self
Set the wave width
Sourcepub fn background(self, color: Color) -> Self
pub fn background(self, color: Color) -> Self
Set the background color
Sourcepub fn rainbow_colors(self, colors: Vec<Color>) -> Self
pub fn rainbow_colors(self, colors: Vec<Color>) -> Self
Set custom rainbow colors
Trait Implementations§
Source§impl Clone for AnimatedTextStyle
impl Clone for AnimatedTextStyle
Source§fn clone(&self) -> AnimatedTextStyle
fn clone(&self) -> AnimatedTextStyle
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 Debug for AnimatedTextStyle
impl Debug for AnimatedTextStyle
Auto Trait Implementations§
impl Freeze for AnimatedTextStyle
impl RefUnwindSafe for AnimatedTextStyle
impl Send for AnimatedTextStyle
impl Sync for AnimatedTextStyle
impl Unpin for AnimatedTextStyle
impl UnwindSafe for AnimatedTextStyle
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