objc2_core_data/generated/
NSIncrementalStore.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSPersistentStore, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "NSPersistentStore")]
15 pub struct NSIncrementalStore;
16);
17
18#[cfg(feature = "NSPersistentStore")]
19extern_conformance!(
20 unsafe impl NSObjectProtocol for NSIncrementalStore {}
21);
22
23#[cfg(feature = "NSPersistentStore")]
24impl NSIncrementalStore {
25 extern_methods!(
26 #[unsafe(method(loadMetadata:_))]
27 #[unsafe(method_family = none)]
28 pub unsafe fn loadMetadata(&self) -> Result<(), Retained<NSError>>;
29
30 #[cfg(all(
31 feature = "NSManagedObjectContext",
32 feature = "NSPersistentStoreRequest"
33 ))]
34 #[unsafe(method(executeRequest:withContext:error:_))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn executeRequest_withContext_error(
37 &self,
38 request: &NSPersistentStoreRequest,
39 context: Option<&NSManagedObjectContext>,
40 ) -> Result<Retained<AnyObject>, Retained<NSError>>;
41
42 #[cfg(all(
43 feature = "NSIncrementalStoreNode",
44 feature = "NSManagedObjectContext",
45 feature = "NSManagedObjectID"
46 ))]
47 #[unsafe(method(newValuesForObjectWithID:withContext:error:_))]
48 #[unsafe(method_family = new)]
49 pub unsafe fn newValuesForObjectWithID_withContext_error(
50 &self,
51 object_id: &NSManagedObjectID,
52 context: &NSManagedObjectContext,
53 ) -> Result<Retained<NSIncrementalStoreNode>, Retained<NSError>>;
54
55 #[cfg(all(
56 feature = "NSManagedObjectContext",
57 feature = "NSManagedObjectID",
58 feature = "NSPropertyDescription",
59 feature = "NSRelationshipDescription"
60 ))]
61 #[unsafe(method(newValueForRelationship:forObjectWithID:withContext:error:_))]
62 #[unsafe(method_family = new)]
63 pub unsafe fn newValueForRelationship_forObjectWithID_withContext_error(
64 &self,
65 relationship: &NSRelationshipDescription,
66 object_id: &NSManagedObjectID,
67 context: Option<&NSManagedObjectContext>,
68 ) -> Result<Retained<AnyObject>, Retained<NSError>>;
69
70 #[unsafe(method(identifierForNewStoreAtURL:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn identifierForNewStoreAtURL(store_url: &NSURL) -> Retained<AnyObject>;
73
74 #[cfg(all(feature = "NSManagedObject", feature = "NSManagedObjectID"))]
75 #[unsafe(method(obtainPermanentIDsForObjects:error:_))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn obtainPermanentIDsForObjects_error(
78 &self,
79 array: &NSArray<NSManagedObject>,
80 ) -> Result<Retained<NSArray<NSManagedObjectID>>, Retained<NSError>>;
81
82 #[cfg(feature = "NSManagedObjectID")]
83 #[unsafe(method(managedObjectContextDidRegisterObjectsWithIDs:))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn managedObjectContextDidRegisterObjectsWithIDs(
86 &self,
87 object_i_ds: &NSArray<NSManagedObjectID>,
88 );
89
90 #[cfg(feature = "NSManagedObjectID")]
91 #[unsafe(method(managedObjectContextDidUnregisterObjectsWithIDs:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn managedObjectContextDidUnregisterObjectsWithIDs(
94 &self,
95 object_i_ds: &NSArray<NSManagedObjectID>,
96 );
97
98 #[cfg(all(feature = "NSEntityDescription", feature = "NSManagedObjectID"))]
99 #[unsafe(method(newObjectIDForEntity:referenceObject:))]
103 #[unsafe(method_family = new)]
104 pub unsafe fn newObjectIDForEntity_referenceObject(
105 &self,
106 entity: &NSEntityDescription,
107 data: &AnyObject,
108 ) -> Retained<NSManagedObjectID>;
109
110 #[cfg(feature = "NSManagedObjectID")]
111 #[unsafe(method(referenceObjectForObjectID:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn referenceObjectForObjectID(
114 &self,
115 object_id: &NSManagedObjectID,
116 ) -> Retained<AnyObject>;
117 );
118}
119
120#[cfg(feature = "NSPersistentStore")]
122impl NSIncrementalStore {
123 extern_methods!(
124 #[cfg(feature = "NSPersistentStoreCoordinator")]
125 #[unsafe(method(initWithPersistentStoreCoordinator:configurationName:URL:options:))]
129 #[unsafe(method_family = init)]
130 pub unsafe fn initWithPersistentStoreCoordinator_configurationName_URL_options(
131 this: Allocated<Self>,
132 root: Option<&NSPersistentStoreCoordinator>,
133 name: Option<&NSString>,
134 url: &NSURL,
135 options: Option<&NSDictionary>,
136 ) -> Retained<Self>;
137
138 #[unsafe(method(init))]
139 #[unsafe(method_family = init)]
140 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
141 );
142}
143
144#[cfg(feature = "NSPersistentStore")]
146impl NSIncrementalStore {
147 extern_methods!(
148 #[unsafe(method(new))]
149 #[unsafe(method_family = new)]
150 pub unsafe fn new() -> Retained<Self>;
151 );
152}