pub struct EmptyState { /* private fields */ }Expand description
What to show when there is nothing to show yet.
let e = EmptyState![title = "No classes yet", description = "Create one to get started.", Button!["New class"]];
let html = render_static(e);
assert!(html.contains(r#"<h3 class="nr-empty-title">No classes yet</h3>"#) && html.contains("nr-empty-actions"));Implementations§
Source§impl EmptyState
impl EmptyState
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.
pub fn title(self, v: impl Into<String>) -> Self
pub fn description(self, v: impl Into<String>) -> Self
Trait Implementations§
Source§impl Default for EmptyState
impl Default for EmptyState
Auto Trait Implementations§
impl !RefUnwindSafe for EmptyState
impl !Sync for EmptyState
impl !UnwindSafe for EmptyState
impl Forget for EmptyState
impl Freeze for EmptyState
impl Move for EmptyState
impl Send for EmptyState
impl Unpin for EmptyState
impl UnsafeUnpin for EmptyState
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