pub struct Skeleton { /* private fields */ }Expand description
A placeholder that shimmers while the real content loads.
let s = Skeleton![lines = 3];
assert_eq!(render_static(s).matches(r#"<span class="nr-skeleton-line">"#).count(), 3);Implementations§
Source§impl Skeleton
impl Skeleton
pub fn new() -> Self
Sourcepub fn class(self, v: impl Into<String>) -> Self
pub fn class(self, v: impl Into<String>) -> Self
Extra classes for the outer element. They win over the defaults.
Sourcepub fn with(self, part: impl Part) -> Self
pub fn with(self, part: impl Part) -> Self
Add an attribute (class(..), id(..), aria(..), …) or a child.
Sourcepub fn lines(self, v: u8) -> Self
pub fn lines(self, v: u8) -> Self
Render as that many text lines (the last one shorter) instead of one box.
pub fn radius(self, v: Radius) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Skeleton
impl !Sync for Skeleton
impl !UnwindSafe for Skeleton
impl Forget for Skeleton
impl Freeze for Skeleton
impl Move for Skeleton
impl Send for Skeleton
impl Unpin for Skeleton
impl UnsafeUnpin for Skeleton
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