objc2_cloud_kit/generated/
CKShareBlockedIdentity.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::*;
5#[cfg(feature = "objc2-contacts")]
6#[cfg(not(target_os = "tvos"))]
7use objc2_contacts::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/cloudkit/ckshareblockedidentity?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct CKShareBlockedIdentity;
17);
18
19unsafe impl Send for CKShareBlockedIdentity {}
20
21unsafe impl Sync for CKShareBlockedIdentity {}
22
23extern_conformance!(
24    unsafe impl NSCoding for CKShareBlockedIdentity {}
25);
26
27extern_conformance!(
28    unsafe impl NSCopying for CKShareBlockedIdentity {}
29);
30
31unsafe impl CopyingHelper for CKShareBlockedIdentity {
32    type Result = Self;
33}
34
35extern_conformance!(
36    unsafe impl NSObjectProtocol for CKShareBlockedIdentity {}
37);
38
39extern_conformance!(
40    unsafe impl NSSecureCoding for CKShareBlockedIdentity {}
41);
42
43impl CKShareBlockedIdentity {
44    extern_methods!(
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new() -> Retained<Self>;
48
49        #[unsafe(method(init))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52
53        #[cfg(feature = "CKUserIdentity")]
54        /// The identity of the user who has been blocked from requesting access to the share.
55        ///
56        /// This property is not atomic.
57        ///
58        /// # Safety
59        ///
60        /// This might not be thread-safe.
61        #[unsafe(method(userIdentity))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn userIdentity(&self) -> Retained<CKUserIdentity>;
64
65        #[cfg(feature = "objc2-contacts")]
66        #[cfg(not(target_os = "tvos"))]
67        /// A displayable `CNContact` representing the blocked user.
68        ///
69        /// If the blocked identity does not exist in the user's contacts or is not accessible, returns a newly created `CNContact`.
70        /// This provides formatted blocked identity information suitable for display in the application's UI.
71        ///
72        /// This property is not atomic.
73        ///
74        /// # Safety
75        ///
76        /// This might not be thread-safe.
77        #[unsafe(method(contact))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn contact(&self) -> Retained<CNContact>;
80    );
81}