pub struct EuvNotificationItem {
pub title: &'static str,
pub text: &'static str,
pub on_close: Option<Rc<dyn Fn()>>,
pub dismissible: bool,
}Expand description
One card in the euv_notification stack.
A notification carries a headline and a body line, plus an optional close button. The component is purely presentational: it renders the item it is given and reports the clicks, so the caller keeps ownership of the queue and of any auto-dismiss timing.
Fields§
§title: &'static strThe notification headline, rendered in c_euv_notification_title.
text: &'static strThe notification body, rendered in c_euv_notification_text.
on_close: Option<Rc<dyn Fn()>>The callback fired when the close button is clicked.
dismissible: boolWhether the notification renders a close button.
Defaults to false, but supplying an on_close callback implies a
dismissible notification, so the close button is rendered either way.
Trait Implementations§
Source§impl Clone for EuvNotificationItem
impl Clone for EuvNotificationItem
Source§impl Debug for EuvNotificationItem
impl Debug for EuvNotificationItem
Auto Trait Implementations§
impl !RefUnwindSafe for EuvNotificationItem
impl !Send for EuvNotificationItem
impl !Sync for EuvNotificationItem
impl !UnwindSafe for EuvNotificationItem
impl Freeze for EuvNotificationItem
impl Unpin for EuvNotificationItem
impl UnsafeUnpin for EuvNotificationItem
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