pub struct EmptyState<'a> { /* private fields */ }Expand description
A centred icon, title, explanation and optional action: an empty list, a search with no results, a document that failed to load.
Implementations§
Source§impl<'a> EmptyState<'a>
impl<'a> EmptyState<'a>
pub fn new(id: &'a str, title: &'a str) -> Self
Sourcepub fn action(self, label: &'a str) -> Self
pub fn action(self, label: &'a str) -> Self
A primary button under the text (registered as <id>.action).
Sourcepub fn icon(self, paint: IconPainter<'a>) -> Self
pub fn icon(self, paint: IconPainter<'a>) -> Self
An icon above the title, painted in the secondary text colour.
pub fn show(self, ui: &mut Ui) -> EmptyStateOutput
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EmptyState<'a>
impl<'a> !Send for EmptyState<'a>
impl<'a> !Sync for EmptyState<'a>
impl<'a> !UnwindSafe for EmptyState<'a>
impl<'a> Forget for EmptyState<'a>
impl<'a> Freeze for EmptyState<'a>
impl<'a> Move for EmptyState<'a>
impl<'a> Unpin for EmptyState<'a>
impl<'a> UnsafeUnpin 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