#[repr(C)]pub struct UNNotificationContent {
pub ptr: Id<Object>,
}Expand description
The uneditable content of a notification.
Fields§
§ptr: Id<Object>The raw pointer to the Objective-C object.
Implementations§
Source§impl UNNotificationContent
impl UNNotificationContent
Sourcepub fn title(&self) -> NSString
pub fn title(&self) -> NSString
The localized text that provides the notification’s primary description.
Sourcepub fn subtitle(&self) -> NSString
pub fn subtitle(&self) -> NSString
The localized text that provides the notification’s secondary description.
Sourcepub fn body(&self) -> NSString
pub fn body(&self) -> NSString
The localized text that provides the notification’s main content.
Sourcepub fn attachments(&self) -> NSArray<UNNotificationAttachment>
pub fn attachments(&self) -> NSArray<UNNotificationAttachment>
The visual and audio attachments to display alongside the notification’s main content.
Sourcepub fn user_info(&self) -> NSDictionary<id, id>
pub fn user_info(&self) -> NSDictionary<id, id>
The custom data to associate with the notification.
Sourcepub fn launch_image_name(&self) -> NSString
pub fn launch_image_name(&self) -> NSString
The name of the image or storyboard to use when your app launches because of the notification.
Sourcepub fn target_content_identifier(&self) -> Option<NSString>
pub fn target_content_identifier(&self) -> Option<NSString>
The value your app uses to determine which scene to display to handle the notification.
Sourcepub fn sound(&self) -> Option<UNNotificationSound>
pub fn sound(&self) -> Option<UNNotificationSound>
The sound that plays when the system delivers the notification.
Sourcepub fn interruption_level(&self) -> UNNotificationInterruptionLevel
pub fn interruption_level(&self) -> UNNotificationInterruptionLevel
The notification’s importance and required delivery timing.
Sourcepub fn relevance_score(&self) -> c_double
pub fn relevance_score(&self) -> c_double
The score the system uses to determine if the notification is the summary’s featured notification.
Sourcepub fn filter_criteria(&self) -> Option<NSString>
pub fn filter_criteria(&self) -> Option<NSString>
The criteria the system evaluates to determine if it displays the notification in the current Focus.
Sourcepub fn thread_identifier(&self) -> NSString
pub fn thread_identifier(&self) -> NSString
The identifier that groups related notifications.
Sourcepub fn category_identifier(&self) -> NSString
pub fn category_identifier(&self) -> NSString
The identifier of the notification’s category.
Sourcepub fn summary_argument(&self) -> NSString
pub fn summary_argument(&self) -> NSString
The text the system adds to the notification summary to provide additional context.
Sourcepub fn summary_argument_count(&self) -> UInt
pub fn summary_argument_count(&self) -> UInt
The number the system adds to the notification summary when the notification represents multiple items.
Sourcepub fn content_by_updating_with_provider(
&mut self,
provider: id,
) -> Result<UNNotificationContent, NSError>
pub fn content_by_updating_with_provider( &mut self, provider: id, ) -> Result<UNNotificationContent, NSError>
Returns a copy of the notification that includes content from the specified provider.
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T.