objc2_contacts/generated/
CNError.rs1use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9 pub static CNErrorDomain: Option<&'static NSString>;
11}
12
13#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct CNErrorCode(pub NSInteger);
18impl CNErrorCode {
19 #[doc(alias = "CNErrorCodeCommunicationError")]
20 pub const CommunicationError: Self = Self(1);
21 #[doc(alias = "CNErrorCodeDataAccessError")]
22 pub const DataAccessError: Self = Self(2);
23 #[doc(alias = "CNErrorCodeAuthorizationDenied")]
24 pub const AuthorizationDenied: Self = Self(100);
25 #[doc(alias = "CNErrorCodeNoAccessableWritableContainers")]
26 pub const NoAccessableWritableContainers: Self = Self(101);
27 #[doc(alias = "CNErrorCodeUnauthorizedKeys")]
28 pub const UnauthorizedKeys: Self = Self(102);
29 #[doc(alias = "CNErrorCodeFeatureDisabledByUser")]
30 pub const FeatureDisabledByUser: Self = Self(103);
31 #[doc(alias = "CNErrorCodeFeatureNotAvailable")]
32 pub const FeatureNotAvailable: Self = Self(104);
33 #[doc(alias = "CNErrorCodeRecordDoesNotExist")]
34 pub const RecordDoesNotExist: Self = Self(200);
35 #[doc(alias = "CNErrorCodeInsertedRecordAlreadyExists")]
36 pub const InsertedRecordAlreadyExists: Self = Self(201);
37 #[doc(alias = "CNErrorCodeContainmentCycle")]
38 pub const ContainmentCycle: Self = Self(202);
39 #[doc(alias = "CNErrorCodeContainmentScope")]
40 pub const ContainmentScope: Self = Self(203);
41 #[doc(alias = "CNErrorCodeParentRecordDoesNotExist")]
42 pub const ParentRecordDoesNotExist: Self = Self(204);
43 #[doc(alias = "CNErrorCodeRecordIdentifierInvalid")]
44 pub const RecordIdentifierInvalid: Self = Self(205);
45 #[doc(alias = "CNErrorCodeRecordNotWritable")]
46 pub const RecordNotWritable: Self = Self(206);
47 #[doc(alias = "CNErrorCodeParentContainerNotWritable")]
48 pub const ParentContainerNotWritable: Self = Self(207);
49 #[doc(alias = "CNErrorCodeValidationMultipleErrors")]
50 pub const ValidationMultipleErrors: Self = Self(300);
51 #[doc(alias = "CNErrorCodeValidationTypeMismatch")]
52 pub const ValidationTypeMismatch: Self = Self(301);
53 #[doc(alias = "CNErrorCodeValidationConfigurationError")]
54 pub const ValidationConfigurationError: Self = Self(302);
55 #[doc(alias = "CNErrorCodePredicateInvalid")]
56 pub const PredicateInvalid: Self = Self(400);
57 #[doc(alias = "CNErrorCodePolicyViolation")]
58 pub const PolicyViolation: Self = Self(500);
59 #[doc(alias = "CNErrorCodeClientIdentifierInvalid")]
60 pub const ClientIdentifierInvalid: Self = Self(600);
61 #[doc(alias = "CNErrorCodeClientIdentifierDoesNotExist")]
62 pub const ClientIdentifierDoesNotExist: Self = Self(601);
63 #[doc(alias = "CNErrorCodeClientIdentifierCollision")]
64 pub const ClientIdentifierCollision: Self = Self(602);
65 #[doc(alias = "CNErrorCodeChangeHistoryExpired")]
66 pub const ChangeHistoryExpired: Self = Self(603);
67 #[doc(alias = "CNErrorCodeChangeHistoryInvalidAnchor")]
68 pub const ChangeHistoryInvalidAnchor: Self = Self(604);
69 #[doc(alias = "CNErrorCodeChangeHistoryInvalidFetchRequest")]
70 pub const ChangeHistoryInvalidFetchRequest: Self = Self(605);
71 #[doc(alias = "CNErrorCodeVCardMalformed")]
72 pub const VCardMalformed: Self = Self(700);
73 #[doc(alias = "CNErrorCodeVCardSummarizationError")]
74 pub const VCardSummarizationError: Self = Self(701);
75}
76
77unsafe impl Encode for CNErrorCode {
78 const ENCODING: Encoding = NSInteger::ENCODING;
79}
80
81unsafe impl RefEncode for CNErrorCode {
82 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
83}
84
85extern "C" {
86 pub static CNErrorUserInfoAffectedRecordsKey: Option<&'static NSString>;
90}
91
92extern "C" {
93 pub static CNErrorUserInfoAffectedRecordIdentifiersKey: Option<&'static NSString>;
97}
98
99extern "C" {
100 pub static CNErrorUserInfoValidationErrorsKey: Option<&'static NSString>;
104}
105
106extern "C" {
107 pub static CNErrorUserInfoKeyPathsKey: Option<&'static NSString>;
111}