Struct bevy_notify::Toast
source · pub struct Toast { /* private fields */ }Expand description
Single notification or toast
Implementations
sourceimpl Toast
impl Toast
sourcepub fn basic(caption: impl Into<String>) -> Toast
pub fn basic(caption: impl Into<String>) -> Toast
Creates new basic toast, can be closed by default.
sourcepub fn success(caption: impl Into<String>) -> Toast
pub fn success(caption: impl Into<String>) -> Toast
Creates new success toast, can be closed by default.
sourcepub fn info(caption: impl Into<String>) -> Toast
pub fn info(caption: impl Into<String>) -> Toast
Creates new info toast, can be closed by default.
sourcepub fn warning(caption: impl Into<String>) -> Toast
pub fn warning(caption: impl Into<String>) -> Toast
Creates new warning toast, can be closed by default.
sourcepub fn error(caption: impl Into<String>) -> Toast
pub fn error(caption: impl Into<String>) -> Toast
Creates new error toast, can not be closed by default.
sourcepub fn set_options(&mut self, options: ToastOptions) -> &mut Toast
pub fn set_options(&mut self, options: ToastOptions) -> &mut Toast
Set the options with a ToastOptions
sourcepub fn set_level(&mut self, level: ToastLevel) -> &mut Toast
pub fn set_level(&mut self, level: ToastLevel) -> &mut Toast
Change the level of the toast
sourcepub fn set_closable(&mut self, closable: bool) -> &mut Toast
pub fn set_closable(&mut self, closable: bool) -> &mut Toast
Can use close the toast?
sourcepub fn set_duration(&mut self, duration: Option<Duration>) -> &mut Toast
pub fn set_duration(&mut self, duration: Option<Duration>) -> &mut Toast
In what time should the toast expire? Set to None for no expiry.
sourcepub fn set_height(&mut self, height: f32) -> &mut Toast
pub fn set_height(&mut self, height: f32) -> &mut Toast
Toast’s box height
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Toast
impl Send for Toast
impl Sync for Toast
impl Unpin for Toast
impl UnwindSafe for Toast
Blanket Implementations
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for Twhere
U: ShaderType,
&'a T: for<'a> Into<U>,
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
Return the
T [ShaderType] for self. When used in [AsBindGroup]
derives, it is safe to assume that all images in self exist. Read moresourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more