objc2_store_kit/generated/
SKError.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/storekit/skerrordomain?language=objc)
11    pub static SKErrorDomain: &'static NSString;
12}
13
14/// [Apple's documentation](https://developer.apple.com/documentation/storekit/skerrorcode?language=objc)
15// NS_ENUM
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct SKErrorCode(pub NSInteger);
19impl SKErrorCode {
20    #[doc(alias = "SKErrorUnknown")]
21    pub const Unknown: Self = Self(0);
22    #[doc(alias = "SKErrorClientInvalid")]
23    pub const ClientInvalid: Self = Self(1);
24    #[doc(alias = "SKErrorPaymentCancelled")]
25    pub const PaymentCancelled: Self = Self(2);
26    #[doc(alias = "SKErrorPaymentInvalid")]
27    pub const PaymentInvalid: Self = Self(3);
28    #[doc(alias = "SKErrorPaymentNotAllowed")]
29    pub const PaymentNotAllowed: Self = Self(4);
30    #[doc(alias = "SKErrorStoreProductNotAvailable")]
31    pub const StoreProductNotAvailable: Self = Self(5);
32    #[doc(alias = "SKErrorCloudServicePermissionDenied")]
33    pub const CloudServicePermissionDenied: Self = Self(6);
34    #[doc(alias = "SKErrorCloudServiceNetworkConnectionFailed")]
35    pub const CloudServiceNetworkConnectionFailed: Self = Self(7);
36    #[doc(alias = "SKErrorCloudServiceRevoked")]
37    pub const CloudServiceRevoked: Self = Self(8);
38    #[doc(alias = "SKErrorPrivacyAcknowledgementRequired")]
39    pub const PrivacyAcknowledgementRequired: Self = Self(9);
40    #[doc(alias = "SKErrorUnauthorizedRequestData")]
41    pub const UnauthorizedRequestData: Self = Self(10);
42    #[doc(alias = "SKErrorInvalidOfferIdentifier")]
43    pub const InvalidOfferIdentifier: Self = Self(11);
44    #[doc(alias = "SKErrorInvalidSignature")]
45    pub const InvalidSignature: Self = Self(12);
46    #[doc(alias = "SKErrorMissingOfferParams")]
47    pub const MissingOfferParams: Self = Self(13);
48    #[doc(alias = "SKErrorInvalidOfferPrice")]
49    pub const InvalidOfferPrice: Self = Self(14);
50    #[doc(alias = "SKErrorOverlayCancelled")]
51    pub const OverlayCancelled: Self = Self(15);
52    #[doc(alias = "SKErrorOverlayInvalidConfiguration")]
53    pub const OverlayInvalidConfiguration: Self = Self(16);
54    #[doc(alias = "SKErrorOverlayTimeout")]
55    pub const OverlayTimeout: Self = Self(17);
56    #[doc(alias = "SKErrorIneligibleForOffer")]
57    pub const IneligibleForOffer: Self = Self(18);
58    #[doc(alias = "SKErrorUnsupportedPlatform")]
59    pub const UnsupportedPlatform: Self = Self(19);
60    #[doc(alias = "SKErrorOverlayPresentedInBackgroundScene")]
61    pub const OverlayPresentedInBackgroundScene: Self = Self(20);
62}
63
64unsafe impl Encode for SKErrorCode {
65    const ENCODING: Encoding = NSInteger::ENCODING;
66}
67
68unsafe impl RefEncode for SKErrorCode {
69    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
70}