pub struct EmptyState { /* private fields */ }Expand description
An empty state widget for no-data scenarios
Displays a consistent, helpful message when there’s no content to show.
Implementations§
Source§impl EmptyState
impl EmptyState
Sourcepub fn no_results(title: impl Into<String>) -> Self
pub fn no_results(title: impl Into<String>) -> Self
Create an empty state for no results
Sourcepub fn no_permission(title: impl Into<String>) -> Self
pub fn no_permission(title: impl Into<String>) -> Self
Create a no permission empty state
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Set the description text
Sourcepub fn state_type(self, state_type: EmptyStateType) -> Self
pub fn state_type(self, state_type: EmptyStateType) -> Self
Set the state type
Sourcepub fn variant(self, variant: EmptyStateVariant) -> Self
pub fn variant(self, variant: EmptyStateVariant) -> Self
Set the visual variant
Sourcepub fn custom_icon(self, icon: char) -> Self
pub fn custom_icon(self, icon: char) -> Self
Set a custom icon
Source§impl EmptyState
impl EmptyState
Sourcepub fn is_focused(&self) -> bool
pub fn is_focused(&self) -> bool
Check if widget is focused
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Check if widget is disabled
Sourcepub fn set_focused(&mut self, focused: bool)
pub fn set_focused(&mut self, focused: bool)
Set focused state (mutable)
Source§impl EmptyState
impl EmptyState
Trait Implementations§
Source§impl Default for EmptyState
impl Default for EmptyState
Source§impl StyledView for EmptyState
impl StyledView for EmptyState
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Source§impl View for EmptyState
impl View for EmptyState
Source§fn meta(&self) -> WidgetMeta
fn meta(&self) -> WidgetMeta
Get widget metadata for DOM Read more
Source§fn render(&self, ctx: &mut RenderContext<'_>)
fn render(&self, ctx: &mut RenderContext<'_>)
Render the view to the given context Read more
Source§fn widget_type(&self) -> &'static str
fn widget_type(&self) -> &'static str
Get widget type name (for CSS type selectors) Read more
Auto Trait Implementations§
impl Freeze for EmptyState
impl RefUnwindSafe for EmptyState
impl Send for EmptyState
impl Sync for EmptyState
impl Unpin for EmptyState
impl UnwindSafe 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