pub struct EmptyState<'a> { /* private fields */ }Expand description
A horizontally centred empty-state placeholder: optional icon, message, optional description and optional primary action.
Implementations§
Source§impl<'a> EmptyState<'a>
impl<'a> EmptyState<'a>
Sourcepub fn description(self, desc: &'a str) -> Self
pub fn description(self, desc: &'a str) -> Self
Add a secondary description line.
Sourcepub fn action(self, label: &'a str) -> Self
pub fn action(self, label: &'a str) -> Self
Add a primary button with this label below the text; Self::show reports its clicks.
Sourcepub fn fill_height(self) -> Self
pub fn fill_height(self) -> Self
Centre the empty state vertically in the rest of the Ui, for a panel or list that
shows nothing else. Without it, the empty state takes only its own height.
Auto Trait Implementations§
impl<'a> Freeze for EmptyState<'a>
impl<'a> RefUnwindSafe for EmptyState<'a>
impl<'a> Send for EmptyState<'a>
impl<'a> Sync for EmptyState<'a>
impl<'a> Unpin for EmptyState<'a>
impl<'a> UnsafeUnpin for EmptyState<'a>
impl<'a> UnwindSafe for EmptyState<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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