objc2_pass_kit/generated/
PKIdentityError.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    /// Error domain for identity errors.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/passkit/pkidentityerrordomain?language=objc)
13    pub static PKIdentityErrorDomain: &'static NSErrorDomain;
14}
15
16/// Identity error codes.
17///
18/// See also [Apple's documentation](https://developer.apple.com/documentation/passkit/pkidentityerror?language=objc)
19// NS_ERROR_ENUM
20#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct PKIdentityError(pub NSInteger);
23impl PKIdentityError {
24    /// Catch-all for all errors without a specific error code.
25    #[doc(alias = "PKIdentityErrorUnknown")]
26    pub const Unknown: Self = Self(0);
27    /// Returned if the request originates from an unsupported device.
28    #[doc(alias = "PKIdentityErrorNotSupported")]
29    pub const NotSupported: Self = Self(1);
30    /// Returned if the sheet was cancelled.
31    #[doc(alias = "PKIdentityErrorCancelled")]
32    pub const Cancelled: Self = Self(2);
33    /// Returned if a request cannot be processed because
34    /// the network is not available.
35    #[doc(alias = "PKIdentityErrorNetworkUnavailable")]
36    pub const NetworkUnavailable: Self = Self(3);
37    /// Returned if no supported elements were requested.
38    #[doc(alias = "PKIdentityErrorNoElementsRequested")]
39    pub const NoElementsRequested: Self = Self(4);
40    /// Returned if a request is made but another request is already
41    /// in progress.
42    #[doc(alias = "PKIdentityErrorRequestAlreadyInProgress")]
43    pub const RequestAlreadyInProgress: Self = Self(5);
44    /// Returned if the caller-supplied nonce is too large or otherwise unsuitable.
45    #[doc(alias = "PKIdentityErrorInvalidNonce")]
46    pub const InvalidNonce: Self = Self(6);
47    /// Returned if an element requested by the caller is invalid.
48    #[doc(alias = "PKIdentityErrorInvalidElement")]
49    pub const InvalidElement: Self = Self(7);
50    /// Returned if the document descriptor region is not supported.
51    #[doc(alias = "PKIdentityErrorRegionNotSupported")]
52    pub const RegionNotSupported: Self = Self(8);
53}
54
55unsafe impl Encode for PKIdentityError {
56    const ENCODING: Encoding = NSInteger::ENCODING;
57}
58
59unsafe impl RefEncode for PKIdentityError {
60    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
61}