objc2_core_data/generated/
NSPersistentCloudKitContainerOptions.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-cloud-kit")]
7use objc2_cloud_kit::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// NSPersistentCloudKitContainerOptions provides customization of how NSPersistentCloudKitContainer aligns a given instance of NSPersistentStoreDescription with a CloudKit database.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/coredata/nspersistentcloudkitcontaineroptions?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct NSPersistentCloudKitContainerOptions;
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for NSPersistentCloudKitContainerOptions {}
23);
24
25impl NSPersistentCloudKitContainerOptions {
26    extern_methods!(
27        /// The container identifier of the CKContainer to use with a given instance of NSPersistentStoreDescription
28        #[unsafe(method(containerIdentifier))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn containerIdentifier(&self) -> Retained<NSString>;
31
32        #[cfg(feature = "objc2-cloud-kit")]
33        #[unsafe(method(databaseScope))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn databaseScope(&self) -> CKDatabaseScope;
36
37        #[cfg(feature = "objc2-cloud-kit")]
38        /// Setter for [`databaseScope`][Self::databaseScope].
39        #[unsafe(method(setDatabaseScope:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn setDatabaseScope(&self, database_scope: CKDatabaseScope);
42
43        #[unsafe(method(init))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47        #[unsafe(method(initWithContainerIdentifier:))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn initWithContainerIdentifier(
50            this: Allocated<Self>,
51            container_identifier: &NSString,
52        ) -> Retained<Self>;
53    );
54}
55
56/// Methods declared on superclass `NSObject`.
57impl NSPersistentCloudKitContainerOptions {
58    extern_methods!(
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}