objc2-pass-kit 0.3.2

Bindings to the PassKit 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" {
    /// Error domain for identity errors.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/passkit/pkidentityerrordomain?language=objc)
    pub static PKIdentityErrorDomain: &'static NSErrorDomain;
}

/// Identity error codes.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/passkit/pkidentityerror?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct PKIdentityError(pub NSInteger);
impl PKIdentityError {
    /// Catch-all for all errors without a specific error code.
    #[doc(alias = "PKIdentityErrorUnknown")]
    pub const Unknown: Self = Self(0);
    /// Returned if the request originates from an unsupported device.
    #[doc(alias = "PKIdentityErrorNotSupported")]
    pub const NotSupported: Self = Self(1);
    /// Returned if the sheet was cancelled.
    #[doc(alias = "PKIdentityErrorCancelled")]
    pub const Cancelled: Self = Self(2);
    /// Returned if a request cannot be processed because
    /// the network is not available.
    #[doc(alias = "PKIdentityErrorNetworkUnavailable")]
    pub const NetworkUnavailable: Self = Self(3);
    /// Returned if no supported elements were requested.
    #[doc(alias = "PKIdentityErrorNoElementsRequested")]
    pub const NoElementsRequested: Self = Self(4);
    /// Returned if a request is made but another request is already
    /// in progress.
    #[doc(alias = "PKIdentityErrorRequestAlreadyInProgress")]
    pub const RequestAlreadyInProgress: Self = Self(5);
    /// Returned if the caller-supplied nonce is too large or otherwise unsuitable.
    #[doc(alias = "PKIdentityErrorInvalidNonce")]
    pub const InvalidNonce: Self = Self(6);
    /// Returned if an element requested by the caller is invalid.
    #[doc(alias = "PKIdentityErrorInvalidElement")]
    pub const InvalidElement: Self = Self(7);
    /// Returned if the document descriptor region is not supported.
    #[doc(alias = "PKIdentityErrorRegionNotSupported")]
    pub const RegionNotSupported: Self = Self(8);
}

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

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