pub struct NotificationCenter { /* private fields */ }Expand description
Thread-safe producer for transient, window-hosted notifications.
Implementations§
Source§impl NotificationCenter
impl NotificationCenter
pub fn new() -> Self
pub fn push(&self, notification: TransientNotification) -> NotificationId
pub fn notify( &self, title: impl Into<String>, message: impl Into<String>, ) -> NotificationId
pub fn dismiss(&self, id: NotificationId) -> bool
pub fn clear(&self) -> bool
pub fn snapshot(&self) -> Vec<TransientNotification>
Trait Implementations§
Source§impl Clone for NotificationCenter
impl Clone for NotificationCenter
Auto Trait Implementations§
impl Forget for NotificationCenter
impl Freeze for NotificationCenter
impl Move for NotificationCenter
impl RefUnwindSafe for NotificationCenter
impl Send for NotificationCenter
impl Sync for NotificationCenter
impl Unpin for NotificationCenter
impl UnsafeUnpin for NotificationCenter
impl UnwindSafe for NotificationCenter
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