#[non_exhaustive]pub enum NotificationCommand {
Permission {
id: u32,
ask: bool,
},
Show {
id: u32,
notification: Notification,
},
Close(String),
CloseAll,
Listen,
SetBadge(u32),
}Expand description
What the core asks of the platform (on the root,
crate::Command::Notification). Sent only where
Environment::notifications
holds, but for Self::SetBadge.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Permission
Report the permission as request id; with ask, ask the user
first when they were not asked yet.
Show
Show notification and report whether the system took it as
request id.
Close(String)
Remove the notification called this, shown or waiting to show.
CloseAll
Remove every notification of the app’s, shown or waiting to show, those an earlier run of the app left included where the platform can reach them.
Listen
Report the notifications the user presses, those pressed before now (which started the app) first.
SetBadge(u32)
Shows count on the app’s icon; 0 clears it. Where the platform has
no badge, nothing happens.
Trait Implementations§
Source§impl Clone for NotificationCommand
impl Clone for NotificationCommand
Source§impl Debug for NotificationCommand
impl Debug for NotificationCommand
impl Eq for NotificationCommand
Source§impl PartialEq for NotificationCommand
impl PartialEq for NotificationCommand
impl StructuralPartialEq for NotificationCommand
Auto Trait Implementations§
impl Forget for NotificationCommand
impl Freeze for NotificationCommand
impl Move for NotificationCommand
impl RefUnwindSafe for NotificationCommand
impl Send for NotificationCommandwhere
RawVecInner: Send,
impl Sync for NotificationCommandwhere
RawVecInner: Sync,
impl Unpin for NotificationCommand
impl UnsafeUnpin for NotificationCommand
impl UnwindSafe for NotificationCommandwhere
RawVecInner: UnwindSafe,
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