objc2-store-kit 0.3.2

Bindings to the StoreKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/storekit/skerrordomain?language=objc)
    pub static SKErrorDomain: &'static NSString;
}

/// [Apple's documentation](https://developer.apple.com/documentation/storekit/skerrorcode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SKErrorCode(pub NSInteger);
impl SKErrorCode {
    #[doc(alias = "SKErrorUnknown")]
    pub const Unknown: Self = Self(0);
    #[doc(alias = "SKErrorClientInvalid")]
    pub const ClientInvalid: Self = Self(1);
    #[doc(alias = "SKErrorPaymentCancelled")]
    pub const PaymentCancelled: Self = Self(2);
    #[doc(alias = "SKErrorPaymentInvalid")]
    pub const PaymentInvalid: Self = Self(3);
    #[doc(alias = "SKErrorPaymentNotAllowed")]
    pub const PaymentNotAllowed: Self = Self(4);
    #[doc(alias = "SKErrorStoreProductNotAvailable")]
    pub const StoreProductNotAvailable: Self = Self(5);
    #[doc(alias = "SKErrorCloudServicePermissionDenied")]
    pub const CloudServicePermissionDenied: Self = Self(6);
    #[doc(alias = "SKErrorCloudServiceNetworkConnectionFailed")]
    pub const CloudServiceNetworkConnectionFailed: Self = Self(7);
    #[doc(alias = "SKErrorCloudServiceRevoked")]
    pub const CloudServiceRevoked: Self = Self(8);
    #[doc(alias = "SKErrorPrivacyAcknowledgementRequired")]
    pub const PrivacyAcknowledgementRequired: Self = Self(9);
    #[doc(alias = "SKErrorUnauthorizedRequestData")]
    pub const UnauthorizedRequestData: Self = Self(10);
    #[doc(alias = "SKErrorInvalidOfferIdentifier")]
    pub const InvalidOfferIdentifier: Self = Self(11);
    #[doc(alias = "SKErrorInvalidSignature")]
    pub const InvalidSignature: Self = Self(12);
    #[doc(alias = "SKErrorMissingOfferParams")]
    pub const MissingOfferParams: Self = Self(13);
    #[doc(alias = "SKErrorInvalidOfferPrice")]
    pub const InvalidOfferPrice: Self = Self(14);
    #[doc(alias = "SKErrorOverlayCancelled")]
    pub const OverlayCancelled: Self = Self(15);
    #[doc(alias = "SKErrorOverlayInvalidConfiguration")]
    pub const OverlayInvalidConfiguration: Self = Self(16);
    #[doc(alias = "SKErrorOverlayTimeout")]
    pub const OverlayTimeout: Self = Self(17);
    #[doc(alias = "SKErrorIneligibleForOffer")]
    pub const IneligibleForOffer: Self = Self(18);
    #[doc(alias = "SKErrorUnsupportedPlatform")]
    pub const UnsupportedPlatform: Self = Self(19);
    #[doc(alias = "SKErrorOverlayPresentedInBackgroundScene")]
    pub const OverlayPresentedInBackgroundScene: Self = Self(20);
}

unsafe impl Encode for SKErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for SKErrorCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}