objc2_class_kit/generated/
CLSDefines.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9    /// [Apple's documentation](https://developer.apple.com/documentation/classkit/clserrorcodedomain?language=objc)
10    pub static CLSErrorCodeDomain: Option<&'static NSString>;
11}
12
13/// [Apple's documentation](https://developer.apple.com/documentation/classkit/clserrorcode?language=objc)
14// NS_ERROR_ENUM
15#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct CLSErrorCode(pub NSInteger);
18impl CLSErrorCode {
19    #[doc(alias = "CLSErrorCodeNone")]
20    pub const None: Self = Self(0);
21    #[doc(alias = "CLSErrorCodeClassKitUnavailable")]
22    pub const ClassKitUnavailable: Self = Self(1);
23    #[doc(alias = "CLSErrorCodeInvalidArgument")]
24    pub const InvalidArgument: Self = Self(2);
25    #[doc(alias = "CLSErrorCodeInvalidModification")]
26    pub const InvalidModification: Self = Self(3);
27    #[doc(alias = "CLSErrorCodeAuthorizationDenied")]
28    pub const AuthorizationDenied: Self = Self(4);
29    #[doc(alias = "CLSErrorCodeDatabaseInaccessible")]
30    pub const DatabaseInaccessible: Self = Self(5);
31    #[doc(alias = "CLSErrorCodeLimits")]
32    pub const Limits: Self = Self(6);
33    #[doc(alias = "CLSErrorCodeInvalidCreate")]
34    pub const InvalidCreate: Self = Self(7);
35    #[doc(alias = "CLSErrorCodeInvalidUpdate")]
36    pub const InvalidUpdate: Self = Self(8);
37    #[doc(alias = "CLSErrorCodePartialFailure")]
38    pub const PartialFailure: Self = Self(9);
39    #[doc(alias = "CLSErrorCodeInvalidAccountCredentials")]
40    pub const InvalidAccountCredentials: Self = Self(10);
41}
42
43unsafe impl Encode for CLSErrorCode {
44    const ENCODING: Encoding = NSInteger::ENCODING;
45}
46
47unsafe impl RefEncode for CLSErrorCode {
48    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
49}
50
51/// [Apple's documentation](https://developer.apple.com/documentation/classkit/clserroruserinfokey?language=objc)
52// NS_TYPED_EXTENSIBLE_ENUM
53pub type CLSErrorUserInfoKey = NSString;
54
55extern "C" {
56    /// Any object that caused a failure will be available in - [NSError userInfo]; under this key.
57    ///
58    /// See also [Apple's documentation](https://developer.apple.com/documentation/classkit/clserrorobjectkey?language=objc)
59    pub static CLSErrorObjectKey: Option<&'static CLSErrorUserInfoKey>;
60}
61
62extern "C" {
63    /// If multiple objects cause errors we return an error with code `CLSErrorCodePartialFailure` which will contain an array of errors in - [NSError userInfo]; under this key.
64    ///
65    /// See also [Apple's documentation](https://developer.apple.com/documentation/classkit/clserrorunderlyingerrorskey?language=objc)
66    pub static CLSErrorUnderlyingErrorsKey: Option<&'static CLSErrorUserInfoKey>;
67}
68
69extern "C" {
70    /// Errors with the code `CLSErrorCodePartialFailure` may contain an array of successful entities in - [NSError userInfo]; under this key.
71    ///
72    /// See also [Apple's documentation](https://developer.apple.com/documentation/classkit/clserrorsuccessfulobjectskey?language=objc)
73    pub static CLSErrorSuccessfulObjectsKey: Option<&'static CLSErrorUserInfoKey>;
74}
75
76/// [Apple's documentation](https://developer.apple.com/documentation/classkit/clspredicatekeypath?language=objc)
77// NS_TYPED_EXTENSIBLE_ENUM
78pub type CLSPredicateKeyPath = NSString;
79
80extern "C" {
81    /// [Apple's documentation](https://developer.apple.com/documentation/classkit/clspredicatekeypathdatecreated?language=objc)
82    pub static CLSPredicateKeyPathDateCreated: Option<&'static CLSPredicateKeyPath>;
83}
84
85extern "C" {
86    /// [Apple's documentation](https://developer.apple.com/documentation/classkit/clspredicatekeypathidentifier?language=objc)
87    pub static CLSPredicateKeyPathIdentifier: Option<&'static CLSPredicateKeyPath>;
88}
89
90extern "C" {
91    /// [Apple's documentation](https://developer.apple.com/documentation/classkit/clspredicatekeypathtitle?language=objc)
92    pub static CLSPredicateKeyPathTitle: Option<&'static CLSPredicateKeyPath>;
93}
94
95extern "C" {
96    /// [Apple's documentation](https://developer.apple.com/documentation/classkit/clspredicatekeypathuniversallinkurl?language=objc)
97    pub static CLSPredicateKeyPathUniversalLinkURL: Option<&'static CLSPredicateKeyPath>;
98}
99
100extern "C" {
101    /// [Apple's documentation](https://developer.apple.com/documentation/classkit/clspredicatekeypathtopic?language=objc)
102    pub static CLSPredicateKeyPathTopic: Option<&'static CLSPredicateKeyPath>;
103}
104
105extern "C" {
106    /// [Apple's documentation](https://developer.apple.com/documentation/classkit/clspredicatekeypathparent?language=objc)
107    pub static CLSPredicateKeyPathParent: Option<&'static CLSPredicateKeyPath>;
108}