objc2_core_data/generated/
NSPersistentHistoryTransaction.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/coredata/nspersistenthistorytransaction?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct NSPersistentHistoryTransaction;
14);
15
16extern_conformance!(
17    unsafe impl NSCopying for NSPersistentHistoryTransaction {}
18);
19
20unsafe impl CopyingHelper for NSPersistentHistoryTransaction {
21    type Result = Self;
22}
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for NSPersistentHistoryTransaction {}
26);
27
28impl NSPersistentHistoryTransaction {
29    extern_methods!(
30        #[cfg(all(feature = "NSEntityDescription", feature = "NSManagedObjectContext"))]
31        #[unsafe(method(entityDescriptionWithContext:))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn entityDescriptionWithContext(
34            context: &NSManagedObjectContext,
35        ) -> Option<Retained<NSEntityDescription>>;
36
37        #[cfg(feature = "NSEntityDescription")]
38        #[unsafe(method(entityDescription))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn entityDescription() -> Option<Retained<NSEntityDescription>>;
41
42        #[cfg(all(feature = "NSFetchRequest", feature = "NSPersistentStoreRequest"))]
43        #[unsafe(method(fetchRequest))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn fetchRequest() -> Option<Retained<NSFetchRequest>>;
46
47        #[unsafe(method(timestamp))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn timestamp(&self) -> Retained<NSDate>;
50
51        #[cfg(feature = "NSPersistentHistoryChange")]
52        #[unsafe(method(changes))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn changes(&self) -> Option<Retained<NSArray<NSPersistentHistoryChange>>>;
55
56        #[unsafe(method(transactionNumber))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn transactionNumber(&self) -> i64;
59
60        #[unsafe(method(storeID))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn storeID(&self) -> Retained<NSString>;
63
64        #[unsafe(method(bundleID))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn bundleID(&self) -> Retained<NSString>;
67
68        #[unsafe(method(processID))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn processID(&self) -> Retained<NSString>;
71
72        #[unsafe(method(contextName))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn contextName(&self) -> Option<Retained<NSString>>;
75
76        #[unsafe(method(author))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn author(&self) -> Option<Retained<NSString>>;
79
80        #[cfg(feature = "NSPersistentHistoryToken")]
81        #[unsafe(method(token))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn token(&self) -> Retained<NSPersistentHistoryToken>;
84
85        #[unsafe(method(objectIDNotification))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn objectIDNotification(&self) -> Retained<NSNotification>;
88    );
89}
90
91/// Methods declared on superclass `NSObject`.
92impl NSPersistentHistoryTransaction {
93    extern_methods!(
94        #[unsafe(method(init))]
95        #[unsafe(method_family = init)]
96        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97
98        #[unsafe(method(new))]
99        #[unsafe(method_family = new)]
100        pub unsafe fn new() -> Retained<Self>;
101    );
102}