objc2_user_notifications/generated/
UNNotification.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotification?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct UNNotification;
14);
15
16unsafe impl NSCoding for UNNotification {}
17
18unsafe impl NSCopying for UNNotification {}
19
20unsafe impl CopyingHelper for UNNotification {
21    type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for UNNotification {}
25
26unsafe impl NSSecureCoding for UNNotification {}
27
28impl UNNotification {
29    extern_methods!(
30        #[unsafe(method(date))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn date(&self) -> Retained<NSDate>;
33
34        #[cfg(feature = "UNNotificationRequest")]
35        #[unsafe(method(request))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn request(&self) -> Retained<UNNotificationRequest>;
38
39        #[unsafe(method(init))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
42    );
43}
44
45/// Methods declared on superclass `NSObject`.
46impl UNNotification {
47    extern_methods!(
48        #[unsafe(method(new))]
49        #[unsafe(method_family = new)]
50        pub unsafe fn new() -> Retained<Self>;
51    );
52}