pub trait IUNUserNotificationCenter: PNSObject {
Show 16 methods
// Provided methods
fn m_current_notification_center() -> UNUserNotificationCenter
where Self: Sized + FromId { ... }
fn m_get_notification_settings_with_completion_handler<F>(
&self,
completion_handler: F,
)
where F: IntoConcreteBlock<(UNNotificationSettings,), Ret = ()> + 'static { ... }
fn m_set_badge_count_with_completion_handler<F>(
&mut self,
new_badge_count: Int,
completion_handler: F,
)
where F: IntoConcreteBlock<(NSError,), Ret = ()> + 'static { ... }
fn m_request_authorization_with_options_completion_handler<F>(
&mut self,
options: &[UNAuthorizationOptions],
completion_handler: F,
)
where F: IntoConcreteBlock<(bool, Option<NSError>), Ret = ()> + 'static { ... }
fn p_delegate(&self) -> Option<id> { ... }
fn p_set_delegate(&self, delegate: id) { ... }
fn p_supports_content_extensions(&self) -> bool { ... }
fn m_add_notification_request_with_completion_handler<F>(
&mut self,
request: &UNNotificationRequest,
completion_handler: F,
)
where F: IntoConcreteBlock<(NSError,), Ret = ()> + 'static { ... }
fn m_get_pending_notification_requests_with_completion_handler<F>(
&self,
completion_handler: F,
)
where F: IntoConcreteBlock<(NSArray<UNNotificationRequest>,)> { ... }
fn m_remove_pending_notification_requests_with_identifiers(
&mut self,
identifiers: &NSArray<NSString>,
) { ... }
fn m_remove_all_pending_notification_requests(&mut self) { ... }
fn m_get_delivered_notifications_with_completion_handler<F>(
&self,
completion_handler: F,
)
where F: IntoConcreteBlock<(NSArray<UNNotification>,)> { ... }
fn m_remove_delivered_notifications_with_identifiers(
&mut self,
identifiers: &NSArray<NSString>,
) { ... }
fn m_remove_all_delivered_notifications(&mut self) { ... }
fn m_set_notification_categories(
&mut self,
categories: &NSSet<UNNotificationCategory>,
) { ... }
fn m_get_notification_categories_with_completion_handler<F>(
&self,
completion_handler: F,
)
where F: IntoConcreteBlock<(NSSet<UNNotificationCategory>,)> + 'static { ... }
}Expand description
A trait containing all the methods for UNUserNotificationCenter
Provided Methods§
Sourcefn m_current_notification_center() -> UNUserNotificationCenter
fn m_current_notification_center() -> UNUserNotificationCenter
Returns your app’s notification center.
Sourcefn m_get_notification_settings_with_completion_handler<F>(
&self,
completion_handler: F,
)
fn m_get_notification_settings_with_completion_handler<F>( &self, completion_handler: F, )
Retrieves the authorization and feature-related settings for your app.
Sourcefn m_set_badge_count_with_completion_handler<F>(
&mut self,
new_badge_count: Int,
completion_handler: F,
)
fn m_set_badge_count_with_completion_handler<F>( &mut self, new_badge_count: Int, completion_handler: F, )
Updates the badge count for your app’s icon.
Requests the user’s authorization to allow local and remote notifications for your app.
Sourcefn p_delegate(&self) -> Option<id>
fn p_delegate(&self) -> Option<id>
The delegate of the notification center.
Sourcefn p_set_delegate(&self, delegate: id)
fn p_set_delegate(&self, delegate: id)
Sourcefn p_supports_content_extensions(&self) -> bool
fn p_supports_content_extensions(&self) -> bool
A Boolean value that indicates whether the device supports notification content extensions.
Sourcefn m_add_notification_request_with_completion_handler<F>(
&mut self,
request: &UNNotificationRequest,
completion_handler: F,
)
fn m_add_notification_request_with_completion_handler<F>( &mut self, request: &UNNotificationRequest, completion_handler: F, )
Schedules the delivery of a local notification.
Sourcefn m_get_pending_notification_requests_with_completion_handler<F>(
&self,
completion_handler: F,
)
fn m_get_pending_notification_requests_with_completion_handler<F>( &self, completion_handler: F, )
Fetches all of your app’s local notifications that are pending delivery.
Sourcefn m_remove_pending_notification_requests_with_identifiers(
&mut self,
identifiers: &NSArray<NSString>,
)
fn m_remove_pending_notification_requests_with_identifiers( &mut self, identifiers: &NSArray<NSString>, )
Removes your app’s local notifications that are pending and match the specified identifiers.
Sourcefn m_remove_all_pending_notification_requests(&mut self)
fn m_remove_all_pending_notification_requests(&mut self)
Removes all of your app’s pending local notifications.
Sourcefn m_get_delivered_notifications_with_completion_handler<F>(
&self,
completion_handler: F,
)
fn m_get_delivered_notifications_with_completion_handler<F>( &self, completion_handler: F, )
Fetches all of your app’s delivered notifications that are still present in Notification Center.
Sourcefn m_remove_delivered_notifications_with_identifiers(
&mut self,
identifiers: &NSArray<NSString>,
)
fn m_remove_delivered_notifications_with_identifiers( &mut self, identifiers: &NSArray<NSString>, )
Removes your app’s notifications from Notification Center that match the specified identifiers.
Sourcefn m_remove_all_delivered_notifications(&mut self)
fn m_remove_all_delivered_notifications(&mut self)
Removes all of your app’s delivered notifications from Notification Center.
Sourcefn m_set_notification_categories(
&mut self,
categories: &NSSet<UNNotificationCategory>,
)
fn m_set_notification_categories( &mut self, categories: &NSSet<UNNotificationCategory>, )
Registers the notification categories that your app supports.
Sourcefn m_get_notification_categories_with_completion_handler<F>(
&self,
completion_handler: F,
)
fn m_get_notification_categories_with_completion_handler<F>( &self, completion_handler: F, )
Fetches your app’s registered notification categories.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".