objc2_cloud_kit/generated/
CKRecordID.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/cloudkit/ckrecordid?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct CKRecordID;
14);
15
16unsafe impl Send for CKRecordID {}
17
18unsafe impl Sync for CKRecordID {}
19
20extern_conformance!(
21    unsafe impl NSCoding for CKRecordID {}
22);
23
24extern_conformance!(
25    unsafe impl NSCopying for CKRecordID {}
26);
27
28unsafe impl CopyingHelper for CKRecordID {
29    type Result = Self;
30}
31
32extern_conformance!(
33    unsafe impl NSObjectProtocol for CKRecordID {}
34);
35
36extern_conformance!(
37    unsafe impl NSSecureCoding for CKRecordID {}
38);
39
40impl CKRecordID {
41    extern_methods!(
42        #[unsafe(method(init))]
43        #[unsafe(method_family = init)]
44        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
45
46        #[unsafe(method(new))]
47        #[unsafe(method_family = new)]
48        pub unsafe fn new() -> Retained<Self>;
49
50        /// Creates a record ID in the default zone
51        #[unsafe(method(initWithRecordName:))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn initWithRecordName(
54            this: Allocated<Self>,
55            record_name: &NSString,
56        ) -> Retained<Self>;
57
58        #[cfg(feature = "CKRecordZoneID")]
59        #[unsafe(method(initWithRecordName:zoneID:))]
60        #[unsafe(method_family = init)]
61        pub unsafe fn initWithRecordName_zoneID(
62            this: Allocated<Self>,
63            record_name: &NSString,
64            zone_id: &CKRecordZoneID,
65        ) -> Retained<Self>;
66
67        /// This property is not atomic.
68        ///
69        /// # Safety
70        ///
71        /// This might not be thread-safe.
72        #[unsafe(method(recordName))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn recordName(&self) -> Retained<NSString>;
75
76        #[cfg(feature = "CKRecordZoneID")]
77        /// This property is not atomic.
78        ///
79        /// # Safety
80        ///
81        /// This might not be thread-safe.
82        #[unsafe(method(zoneID))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn zoneID(&self) -> Retained<CKRecordZoneID>;
85    );
86}