objc2_core_data/generated/
NSPersistentCloudKitContainerEvent.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
12#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
13pub struct NSPersistentCloudKitContainerEventType(pub NSInteger);
14impl NSPersistentCloudKitContainerEventType {
15 #[doc(alias = "NSPersistentCloudKitContainerEventTypeSetup")]
16 pub const Setup: Self = Self(0);
17 #[doc(alias = "NSPersistentCloudKitContainerEventTypeImport")]
18 pub const Import: Self = Self(1);
19 #[doc(alias = "NSPersistentCloudKitContainerEventTypeExport")]
20 pub const Export: Self = Self(2);
21}
22
23unsafe impl Encode for NSPersistentCloudKitContainerEventType {
24 const ENCODING: Encoding = NSInteger::ENCODING;
25}
26
27unsafe impl RefEncode for NSPersistentCloudKitContainerEventType {
28 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
29}
30
31extern "C" {
32 pub static NSPersistentCloudKitContainerEventChangedNotification: &'static NSNotificationName;
34}
35
36extern "C" {
37 pub static NSPersistentCloudKitContainerEventUserInfoKey: &'static NSString;
39}
40
41extern_class!(
42 #[unsafe(super(NSObject))]
44 #[derive(Debug, PartialEq, Eq, Hash)]
45 pub struct NSPersistentCloudKitContainerEvent;
46);
47
48extern_conformance!(
49 unsafe impl NSCopying for NSPersistentCloudKitContainerEvent {}
50);
51
52unsafe impl CopyingHelper for NSPersistentCloudKitContainerEvent {
53 type Result = Self;
54}
55
56extern_conformance!(
57 unsafe impl NSObjectProtocol for NSPersistentCloudKitContainerEvent {}
58);
59
60impl NSPersistentCloudKitContainerEvent {
61 extern_methods!(
62 #[unsafe(method(identifier))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn identifier(&self) -> Retained<NSUUID>;
65
66 #[unsafe(method(storeIdentifier))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn storeIdentifier(&self) -> Retained<NSString>;
69
70 #[unsafe(method(type))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn r#type(&self) -> NSPersistentCloudKitContainerEventType;
73
74 #[unsafe(method(startDate))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn startDate(&self) -> Retained<NSDate>;
77
78 #[unsafe(method(endDate))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn endDate(&self) -> Option<Retained<NSDate>>;
81
82 #[unsafe(method(succeeded))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn succeeded(&self) -> bool;
85
86 #[unsafe(method(error))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn error(&self) -> Option<Retained<NSError>>;
89
90 #[unsafe(method(new))]
91 #[unsafe(method_family = new)]
92 pub unsafe fn new() -> Retained<Self>;
93
94 #[unsafe(method(init))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97 );
98}