pub struct EmptyState { /* private fields */ }Expand description
An empty place: an icon, a title, a sentence, an action.
Need (state): an empty state, nothing here yet. Need (state): no results for a search or a filter.
Implementations§
Source§impl EmptyState
impl EmptyState
Sourcepub fn new(icon: impl Into<IconRef>, title: impl Into<String>) -> Self
pub fn new(icon: impl Into<IconRef>, title: impl Into<String>) -> Self
An icon by value or by name (Icon::Folder, "phosphor:image"),
and a title.
Sourcepub fn text(self, text: impl Into<String>) -> Self
pub fn text(self, text: impl Into<String>) -> Self
A sentence under the title: why, and what to do.
Trait Implementations§
Source§impl Clone for EmptyState
impl Clone for EmptyState
Source§fn clone(&self) -> EmptyState
fn clone(&self) -> EmptyState
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 Debug for EmptyState
impl Debug for EmptyState
Source§impl PartialEq for EmptyState
impl PartialEq for EmptyState
impl StructuralPartialEq for EmptyState
Auto Trait Implementations§
impl Freeze for EmptyState
impl RefUnwindSafe for EmptyState
impl Send for EmptyState
impl Sync for EmptyState
impl Unpin for EmptyState
impl UnsafeUnpin 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
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