objc2_cloud_kit/generated/
CKUserIdentity.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/ckuseridentity?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct CKUserIdentity;
14);
15
16unsafe impl NSCoding for CKUserIdentity {}
17
18unsafe impl NSCopying for CKUserIdentity {}
19
20unsafe impl CopyingHelper for CKUserIdentity {
21    type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for CKUserIdentity {}
25
26unsafe impl NSSecureCoding for CKUserIdentity {}
27
28impl CKUserIdentity {
29    extern_methods!(
30        /// Use
31        /// `CKDiscoverUserIdentitiesOperation`or
32        /// `CKFetchShareParticipantsOperation`to create a
33        /// `CKUserIdentity`
34        #[unsafe(method(init))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
37
38        #[unsafe(method(new))]
39        #[unsafe(method_family = new)]
40        pub unsafe fn new() -> Retained<Self>;
41
42        #[cfg(feature = "CKRecordID")]
43        #[unsafe(method(userRecordID))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn userRecordID(&self) -> Option<Retained<CKRecordID>>;
46
47        #[cfg(feature = "CKUserIdentityLookupInfo")]
48        /// This is the
49        /// `lookupInfo`you passed in to
50        /// `CKDiscoverUserIdentitiesOperation`or
51        /// `CKFetchShareParticipantsOperation`
52        #[unsafe(method(lookupInfo))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn lookupInfo(&self) -> Option<Retained<CKUserIdentityLookupInfo>>;
55
56        #[unsafe(method(nameComponents))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn nameComponents(&self) -> Option<Retained<NSPersonNameComponents>>;
59
60        #[unsafe(method(hasiCloudAccount))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn hasiCloudAccount(&self) -> bool;
63
64        #[deprecated = "No longer supported. Please see Sharing CloudKit Data with Other iCloud Users."]
65        #[unsafe(method(contactIdentifiers))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn contactIdentifiers(&self) -> Retained<NSArray<NSString>>;
68    );
69}