pub struct SkeletonStreamingText<'a> { /* private fields */ }Expand description
Skeleton simulating streaming chat text.
Cells fill left-to-right, top-to-bottom over duration_ms, mimicking
text being typed into a chat bubble. Once the fill completes, all
lines remain visible and the animation mode pulses normally.
Line widths are deterministic fractions that cycle, producing a ragged paragraph shape.
Implementations§
Source§impl<'a> SkeletonStreamingText<'a>
impl<'a> SkeletonStreamingText<'a>
pub fn new(elapsed_ms: u64) -> Self
pub fn mode(self, mode: AnimationMode) -> Self
pub fn braille(self, braille: bool) -> Self
pub fn base(self, color: impl Into<Color>) -> Self
pub fn highlight(self, color: impl Into<Color>) -> Self
Sourcepub fn duration_ms(self, ms: u64) -> Self
pub fn duration_ms(self, ms: u64) -> Self
Duration in milliseconds for the typewriter to fill all lines. Default: 3000.
Sourcepub fn repeat(self, repeat: bool) -> Self
pub fn repeat(self, repeat: bool) -> Self
Loop the typewriter fill. When true, the fill resets after
duration_ms plus a hold period and replays. Default: false.
Sourcepub fn line_widths(self, widths: &'a [f32]) -> Self
pub fn line_widths(self, widths: &'a [f32]) -> Self
Per-line width fractions (0.0..=1.0), cycling for more lines.
pub fn block(self, block: Block<'a>) -> Self
Trait Implementations§
Source§impl<'a> Clone for SkeletonStreamingText<'a>
impl<'a> Clone for SkeletonStreamingText<'a>
Source§fn clone(&self) -> SkeletonStreamingText<'a>
fn clone(&self) -> SkeletonStreamingText<'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 SkeletonStreamingText<'a>
impl<'a> Debug for SkeletonStreamingText<'a>
Auto Trait Implementations§
impl<'a> Freeze for SkeletonStreamingText<'a>
impl<'a> RefUnwindSafe for SkeletonStreamingText<'a>
impl<'a> Send for SkeletonStreamingText<'a>
impl<'a> Sync for SkeletonStreamingText<'a>
impl<'a> Unpin for SkeletonStreamingText<'a>
impl<'a> UnsafeUnpin for SkeletonStreamingText<'a>
impl<'a> UnwindSafe for SkeletonStreamingText<'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