pub struct Notifications<R: Runtime>(/* private fields */);Expand description
Access to the notification APIs.
You can get an instance of this type via NotificationsExt
Implementations§
Source§impl<R: Runtime> Notifications<R>
impl<R: Runtime> Notifications<R>
pub fn builder(&self) -> NotificationsBuilder<R>
pub async fn request_permission(&self) -> Result<PermissionState>
pub async fn register_for_push_notifications(&self) -> Result<String>
pub fn unregister_for_push_notifications(&self) -> Result<()>
pub async fn permission_state(&self) -> Result<PermissionState>
pub async fn pending(&self) -> Result<Vec<PendingNotification>>
pub async fn active(&self) -> Result<Vec<ActiveNotification>>
pub fn set_click_listener_active(&self, _active: bool) -> Result<()>
pub fn remove_active(&self, _ids: Vec<i32>) -> Result<()>
pub fn cancel(&self, _notifications: Vec<i32>) -> Result<()>
pub fn cancel_all(&self) -> Result<()>
pub fn register_action_types(&self, _types: Vec<ActionType>) -> Result<()>
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 Notifications<R>
impl<R> !RefUnwindSafe for Notifications<R>
impl<R> Send for Notifications<R>
impl<R> Sync for Notifications<R>
impl<R> Unpin for Notifications<R>
impl<R> UnsafeUnpin for Notifications<R>
impl<R> !UnwindSafe for Notifications<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