Struct egui_notify::Toast
source · pub struct Toast { /* private fields */ }
Expand description
Single notification or toast
Implementations§
source§impl Toast
impl Toast
sourcepub fn basic(caption: impl Into<String>) -> Self
pub fn basic(caption: impl Into<String>) -> Self
Creates new basic toast, can be closed by default.
sourcepub fn success(caption: impl Into<String>) -> Self
pub fn success(caption: impl Into<String>) -> Self
Creates new success toast, can be closed by default.
sourcepub fn info(caption: impl Into<String>) -> Self
pub fn info(caption: impl Into<String>) -> Self
Creates new info toast, can be closed by default.
sourcepub fn warning(caption: impl Into<String>) -> Self
pub fn warning(caption: impl Into<String>) -> Self
Creates new warning toast, can be closed by default.
sourcepub fn error(caption: impl Into<String>) -> Self
pub fn error(caption: impl Into<String>) -> Self
Creates new error toast, can not be closed by default.
sourcepub fn set_options(&mut self, options: ToastOptions) -> &mut Self
pub fn set_options(&mut self, options: ToastOptions) -> &mut Self
Set the options with a ToastOptions
sourcepub fn set_level(&mut self, level: ToastLevel) -> &mut Self
pub fn set_level(&mut self, level: ToastLevel) -> &mut Self
Change the level of the toast
sourcepub fn set_closable(&mut self, closable: bool) -> &mut Self
pub fn set_closable(&mut self, closable: bool) -> &mut Self
Can use close the toast?
sourcepub fn set_duration(&mut self, duration: Option<Duration>) -> &mut Self
pub fn set_duration(&mut self, duration: Option<Duration>) -> &mut Self
In what time should the toast expire? Set to None
for no expiry.
sourcepub fn set_height(&mut self, height: f32) -> &mut Self
pub fn set_height(&mut self, height: f32) -> &mut Self
Toast’s box height