pub struct Notification<R: Runtime>(/* private fields */);Expand description
Access to the notification APIs.
You can get an instance of this type via NotificationExt
Implementations§
Source§impl<R: Runtime> Notification<R>
impl<R: Runtime> Notification<R>
pub fn builder(&self) -> NotificationBuilder<R>
pub fn request_permission(&self) -> Result<PermissionState>
pub fn permission_state(&self) -> Result<PermissionState>
pub fn register_action_types(&self, types: Vec<ActionType>) -> Result<()>
pub fn remove_active(&self, notifications: Vec<i32>) -> Result<()>
pub fn active(&self) -> Result<Vec<ActiveNotification>>
pub fn remove_all_active(&self) -> Result<()>
pub fn pending(&self) -> Result<Vec<PendingNotification>>
Sourcepub fn cancel_all(&self) -> Result<()>
pub fn cancel_all(&self) -> Result<()>
Cancel all pending notifications.
pub fn create_channel(&self, channel: Channel) -> Result<()>
pub fn delete_channel(&self, id: impl Into<String>) -> Result<()>
pub fn list_channels(&self) -> Result<Vec<Channel>>
Auto Trait Implementations§
impl<R> Freeze for Notification<R>
impl<R> !RefUnwindSafe for Notification<R>
impl<R> Send for Notification<R>
impl<R> Sync for Notification<R>
impl<R> Unpin for Notification<R>
impl<R> !UnwindSafe for Notification<R>
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