objc2_user_notifications/generated/
UNNotificationAttachment.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/unnotificationattachment?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct UNNotificationAttachment;
14);
15
16unsafe impl NSCoding for UNNotificationAttachment {}
17
18unsafe impl NSCopying for UNNotificationAttachment {}
19
20unsafe impl CopyingHelper for UNNotificationAttachment {
21    type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for UNNotificationAttachment {}
25
26unsafe impl NSSecureCoding for UNNotificationAttachment {}
27
28impl UNNotificationAttachment {
29    extern_methods!(
30        #[unsafe(method(identifier))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn identifier(&self) -> Retained<NSString>;
33
34        #[unsafe(method(URL))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn URL(&self) -> Retained<NSURL>;
37
38        #[unsafe(method(type))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn r#type(&self) -> Retained<NSString>;
41
42        #[unsafe(method(attachmentWithIdentifier:URL:options:error:_))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn attachmentWithIdentifier_URL_options_error(
45            identifier: &NSString,
46            url: &NSURL,
47            options: Option<&NSDictionary>,
48        ) -> Result<Retained<Self>, Retained<NSError>>;
49
50        #[unsafe(method(init))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53    );
54}
55
56/// Methods declared on superclass `NSObject`.
57impl UNNotificationAttachment {
58    extern_methods!(
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}
64
65extern "C" {
66    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationattachmentoptionstypehintkey?language=objc)
67    pub static UNNotificationAttachmentOptionsTypeHintKey: &'static NSString;
68}
69
70extern "C" {
71    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationattachmentoptionsthumbnailhiddenkey?language=objc)
72    pub static UNNotificationAttachmentOptionsThumbnailHiddenKey: &'static NSString;
73}
74
75extern "C" {
76    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationattachmentoptionsthumbnailclippingrectkey?language=objc)
77    pub static UNNotificationAttachmentOptionsThumbnailClippingRectKey: &'static NSString;
78}
79
80extern "C" {
81    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationattachmentoptionsthumbnailtimekey?language=objc)
82    pub static UNNotificationAttachmentOptionsThumbnailTimeKey: &'static NSString;
83}