objc2_pass_kit/generated/
PKError.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 "C" {
10    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpasskiterrordomain?language=objc)
11    pub static PKPassKitErrorDomain: &'static NSString;
12}
13
14/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpasskiterrorcode?language=objc)
15#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct PKPassKitErrorCode(pub NSInteger);
18impl PKPassKitErrorCode {
19    #[doc(alias = "PKUnknownError")]
20    pub const UnknownError: Self = Self(-1);
21    #[doc(alias = "PKInvalidDataError")]
22    pub const InvalidDataError: Self = Self(1);
23    #[doc(alias = "PKUnsupportedVersionError")]
24    pub const UnsupportedVersionError: Self = Self(2);
25    #[doc(alias = "PKInvalidSignature")]
26    pub const InvalidSignature: Self = Self(3);
27    #[doc(alias = "PKNotEntitledError")]
28    pub const NotEntitledError: Self = Self(4);
29}
30
31unsafe impl Encode for PKPassKitErrorCode {
32    const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35unsafe impl RefEncode for PKPassKitErrorCode {
36    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39extern "C" {
40    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrordomain?language=objc)
41    pub static PKPaymentErrorDomain: &'static NSString;
42}
43
44/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorcode?language=objc)
45#[repr(transparent)]
46#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
47pub struct PKPaymentErrorCode(pub NSInteger);
48impl PKPaymentErrorCode {
49    #[doc(alias = "PKPaymentUnknownError")]
50    pub const UnknownError: Self = Self(-1);
51    #[doc(alias = "PKPaymentShippingContactInvalidError")]
52    pub const ShippingContactInvalidError: Self = Self(1);
53    #[doc(alias = "PKPaymentBillingContactInvalidError")]
54    pub const BillingContactInvalidError: Self = Self(2);
55    #[doc(alias = "PKPaymentShippingAddressUnserviceableError")]
56    pub const ShippingAddressUnserviceableError: Self = Self(3);
57    #[doc(alias = "PKPaymentCouponCodeInvalidError")]
58    pub const CouponCodeInvalidError: Self = Self(4);
59    #[doc(alias = "PKPaymentCouponCodeExpiredError")]
60    pub const CouponCodeExpiredError: Self = Self(5);
61}
62
63unsafe impl Encode for PKPaymentErrorCode {
64    const ENCODING: Encoding = NSInteger::ENCODING;
65}
66
67unsafe impl RefEncode for PKPaymentErrorCode {
68    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
69}
70
71/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorkey?language=objc)
72// NS_TYPED_ENUM
73pub type PKPaymentErrorKey = NSString;
74
75extern "C" {
76    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorcontactfielduserinfokey?language=objc)
77    pub static PKPaymentErrorContactFieldUserInfoKey: &'static PKPaymentErrorKey;
78}
79
80extern "C" {
81    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkpaymenterrorpostaladdressuserinfokey?language=objc)
82    pub static PKPaymentErrorPostalAddressUserInfoKey: &'static PKPaymentErrorKey;
83}
84
85extern "C" {
86    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrordomain?language=objc)
87    pub static PKDisbursementErrorDomain: &'static NSString;
88}
89
90/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrorcode?language=objc)
91// NS_ERROR_ENUM
92#[repr(transparent)]
93#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
94pub struct PKDisbursementErrorCode(pub NSInteger);
95impl PKDisbursementErrorCode {
96    #[doc(alias = "PKDisbursementUnknownError")]
97    pub const UnknownError: Self = Self(-1);
98    #[doc(alias = "PKDisbursementUnsupportedCardError")]
99    pub const UnsupportedCardError: Self = Self(1);
100    #[doc(alias = "PKDisbursementRecipientContactInvalidError")]
101    pub const RecipientContactInvalidError: Self = Self(2);
102}
103
104unsafe impl Encode for PKDisbursementErrorCode {
105    const ENCODING: Encoding = NSInteger::ENCODING;
106}
107
108unsafe impl RefEncode for PKDisbursementErrorCode {
109    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
110}
111
112/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrorkey?language=objc)
113// NS_TYPED_ENUM
114pub type PKDisbursementErrorKey = NSString;
115
116extern "C" {
117    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkdisbursementerrorcontactfielduserinfokey?language=objc)
118    pub static PKDisbursementErrorContactFieldUserInfoKey: &'static PKDisbursementErrorKey;
119}
120
121/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddpaymentpasserror?language=objc)
122// NS_ENUM
123#[repr(transparent)]
124#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
125pub struct PKAddPaymentPassError(pub NSInteger);
126impl PKAddPaymentPassError {
127    #[doc(alias = "PKAddPaymentPassErrorUnsupported")]
128    pub const Unsupported: Self = Self(0);
129    #[doc(alias = "PKAddPaymentPassErrorUserCancelled")]
130    pub const UserCancelled: Self = Self(1);
131    #[doc(alias = "PKAddPaymentPassErrorSystemCancelled")]
132    pub const SystemCancelled: Self = Self(2);
133}
134
135unsafe impl Encode for PKAddPaymentPassError {
136    const ENCODING: Encoding = NSInteger::ENCODING;
137}
138
139unsafe impl RefEncode for PKAddPaymentPassError {
140    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
141}
142
143extern "C" {
144    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddsecureelementpasserrordomain?language=objc)
145    pub static PKAddSecureElementPassErrorDomain: &'static NSString;
146}
147
148/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pkaddsecureelementpasserrorcode?language=objc)
149// NS_ERROR_ENUM
150#[repr(transparent)]
151#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
152pub struct PKAddSecureElementPassErrorCode(pub NSInteger);
153impl PKAddSecureElementPassErrorCode {
154    #[doc(alias = "PKAddSecureElementPassGenericError")]
155    pub const GenericError: Self = Self(0);
156    #[doc(alias = "PKAddSecureElementPassUnknownError")]
157    #[deprecated = "Use PKAddSecureElementPassGenericError instead."]
158    pub const UnknownError: Self = Self(PKAddSecureElementPassErrorCode::GenericError.0);
159    #[doc(alias = "PKAddSecureElementPassUserCanceledError")]
160    pub const UserCanceledError: Self = Self(1);
161    #[doc(alias = "PKAddSecureElementPassUnavailableError")]
162    pub const UnavailableError: Self = Self(2);
163    #[doc(alias = "PKAddSecureElementPassInvalidConfigurationError")]
164    pub const InvalidConfigurationError: Self = Self(3);
165    #[doc(alias = "PKAddSecureElementPassDeviceNotSupportedError")]
166    pub const DeviceNotSupportedError: Self = Self(4);
167    #[doc(alias = "PKAddSecureElementPassDeviceNotReadyError")]
168    pub const DeviceNotReadyError: Self = Self(5);
169    #[doc(alias = "PKAddSecureElementPassOSVersionNotSupportedError")]
170    pub const OSVersionNotSupportedError: Self = Self(6);
171}
172
173unsafe impl Encode for PKAddSecureElementPassErrorCode {
174    const ENCODING: Encoding = NSInteger::ENCODING;
175}
176
177unsafe impl RefEncode for PKAddSecureElementPassErrorCode {
178    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
179}
180
181extern "C" {
182    /// [Apple's documentation](https://developer.apple.com/documentation/passkit/pksharesecureelementpasserrordomain?language=objc)
183    pub static PKShareSecureElementPassErrorDomain: &'static NSString;
184}
185
186/// [Apple's documentation](https://developer.apple.com/documentation/passkit/pksharesecureelementpasserrorcode?language=objc)
187// NS_ERROR_ENUM
188#[repr(transparent)]
189#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
190pub struct PKShareSecureElementPassErrorCode(pub NSInteger);
191impl PKShareSecureElementPassErrorCode {
192    #[doc(alias = "PKShareSecureElementPassUnknownError")]
193    pub const UnknownError: Self = Self(0);
194    #[doc(alias = "PKShareSecureElementPassSetupError")]
195    pub const SetupError: Self = Self(1);
196}
197
198unsafe impl Encode for PKShareSecureElementPassErrorCode {
199    const ENCODING: Encoding = NSInteger::ENCODING;
200}
201
202unsafe impl RefEncode for PKShareSecureElementPassErrorCode {
203    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
204}