pub struct SkeletonText<'a> { /* private fields */ }Expand description
Skeleton paragraph with lines of varying width.
Simulates a block of text by rendering █ characters at different
widths per line. The pattern cycles when the area has more rows
than entries in line_widths.
Implementations§
Source§impl<'a> SkeletonText<'a>
impl<'a> SkeletonText<'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 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 longer areas.
pub fn block(self, block: Block<'a>) -> Self
Trait Implementations§
Source§impl<'a> Clone for SkeletonText<'a>
impl<'a> Clone for SkeletonText<'a>
Source§fn clone(&self) -> SkeletonText<'a>
fn clone(&self) -> SkeletonText<'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 SkeletonText<'a>
impl<'a> Debug for SkeletonText<'a>
Auto Trait Implementations§
impl<'a> Freeze for SkeletonText<'a>
impl<'a> RefUnwindSafe for SkeletonText<'a>
impl<'a> Send for SkeletonText<'a>
impl<'a> Sync for SkeletonText<'a>
impl<'a> Unpin for SkeletonText<'a>
impl<'a> UnsafeUnpin for SkeletonText<'a>
impl<'a> UnwindSafe for SkeletonText<'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