pub struct EuvToastProps {
pub variant: EuvToastVariant,
pub title: &'static str,
pub description: &'static str,
pub action_label: &'static str,
pub dismissible: bool,
pub on_action: Option<Rc<dyn Fn()>>,
pub on_close: Option<Rc<dyn Fn()>>,
}Expand description
Props of the euv_toast component.
A toast is a short-lived card: it carries a title, a description, an optional action and an optional close button. The component is presentational — it renders what it is given and reports the clicks, so the caller keeps ownership of the queue and of the dismissal.
Fields§
§variant: EuvToastVariantThe visual variant of the toast.
title: &'static strThe headline of the toast.
description: &'static strThe body line of the toast.
action_label: &'static strThe label of the action button.
dismissible: boolWhether the toast renders a close button.
on_action: Option<Rc<dyn Fn()>>The callback fired when the action button is clicked.
on_close: Option<Rc<dyn Fn()>>The callback fired when the close button is clicked.
Implementations§
Source§impl EuvToastProps
impl EuvToastProps
pub fn get_variant(&self) -> EuvToastVariant
pub fn get_mut_variant(&mut self) -> &mut EuvToastVariant
pub fn set_variant(&mut self, val: EuvToastVariant) -> &mut Self
pub fn get_title(&self) -> &'static str
pub fn get_mut_title(&mut self) -> &mut &'static str
pub fn set_title(&mut self, val: &'static str) -> &mut Self
pub fn get_description(&self) -> &'static str
pub fn get_mut_description(&mut self) -> &mut &'static str
pub fn set_description(&mut self, val: &'static str) -> &mut Self
pub fn get_action_label(&self) -> &'static str
pub fn get_mut_action_label(&mut self) -> &mut &'static str
pub fn set_action_label(&mut self, val: &'static str) -> &mut Self
pub fn get_dismissible(&self) -> bool
pub fn get_mut_dismissible(&mut self) -> &mut bool
pub fn set_dismissible(&mut self, val: bool) -> &mut Self
pub fn get_on_action(&self) -> Rc<dyn Fn() + 'static>
pub fn try_get_on_action(&self) -> &Option<Rc<dyn Fn() + 'static>>
pub fn get_mut_on_action(&mut self) -> &mut Option<Rc<dyn Fn() + 'static>>
pub fn set_on_action( &mut self, val: Option<Rc<dyn Fn() + 'static>>, ) -> &mut Self
pub fn get_on_close(&self) -> Rc<dyn Fn() + 'static>
pub fn try_get_on_close(&self) -> &Option<Rc<dyn Fn() + 'static>>
pub fn get_mut_on_close(&mut self) -> &mut Option<Rc<dyn Fn() + 'static>>
pub fn set_on_close(&mut self, val: Option<Rc<dyn Fn() + 'static>>) -> &mut Self
Trait Implementations§
Source§impl Clone for EuvToastProps
impl Clone for EuvToastProps
Source§impl Debug for EuvToastProps
impl Debug for EuvToastProps
Auto Trait Implementations§
impl !RefUnwindSafe for EuvToastProps
impl !Send for EuvToastProps
impl !Sync for EuvToastProps
impl !UnwindSafe for EuvToastProps
impl Forget for EuvToastProps
impl Freeze for EuvToastProps
impl Move for EuvToastProps
impl Unpin for EuvToastProps
impl UnsafeUnpin for EuvToastProps
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