pub struct Toast { /* private fields */ }
Expand description
Single notification or toast
Implementations§
Source§impl Toast
impl Toast
Sourcepub fn basic(caption: impl Into<WidgetText>) -> Self
pub fn basic(caption: impl Into<WidgetText>) -> Self
Creates new basic toast, can be closed by default.
Sourcepub fn success(caption: impl Into<WidgetText>) -> Self
pub fn success(caption: impl Into<WidgetText>) -> Self
Creates new success toast, can be closed by default.
Sourcepub fn info(caption: impl Into<WidgetText>) -> Self
pub fn info(caption: impl Into<WidgetText>) -> Self
Creates new info toast, can be closed by default.
Sourcepub fn warning(caption: impl Into<WidgetText>) -> Self
pub fn warning(caption: impl Into<WidgetText>) -> Self
Creates new warning toast, can be closed by default.
Sourcepub fn error(caption: impl Into<WidgetText>) -> Self
pub fn error(caption: impl Into<WidgetText>) -> Self
Creates new error toast, can not be closed by default.
Sourcepub fn custom(caption: impl Into<WidgetText>, level: ToastLevel) -> Self
pub fn custom(caption: impl Into<WidgetText>, level: ToastLevel) -> Self
Creates new custom toast, can be closed by default.
Sourcepub fn options(&mut self, options: ToastOptions) -> &mut Self
pub fn options(&mut self, options: ToastOptions) -> &mut Self
Set the options with a ToastOptions
Sourcepub fn level(&mut self, level: ToastLevel) -> &mut Self
pub fn level(&mut self, level: ToastLevel) -> &mut Self
Change the level of the toast
Sourcepub fn show_progress_bar(&mut self, show_progress_bar: bool) -> &mut Self
pub fn show_progress_bar(&mut self, show_progress_bar: bool) -> &mut Self
Should a progress bar be shown?
Auto Trait Implementations§
impl Freeze for Toast
impl RefUnwindSafe for Toast
impl Send for Toast
impl Sync for Toast
impl Unpin for Toast
impl UnwindSafe for Toast
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