objc2_crypto_token_kit/generated/
TKError.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/cryptotokenkit/tkerrordomain?language=objc)
11    pub static TKErrorDomain: &'static NSString;
12}
13
14/// [Apple's documentation](https://developer.apple.com/documentation/cryptotokenkit/tkerrorcode?language=objc)
15// NS_ERROR_ENUM
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct TKErrorCode(pub NSInteger);
19impl TKErrorCode {
20    #[doc(alias = "TKErrorCodeNotImplemented")]
21    pub const NotImplemented: Self = Self(-1);
22    #[doc(alias = "TKErrorCodeCommunicationError")]
23    pub const CommunicationError: Self = Self(-2);
24    #[doc(alias = "TKErrorCodeCorruptedData")]
25    pub const CorruptedData: Self = Self(-3);
26    #[doc(alias = "TKErrorCodeCanceledByUser")]
27    pub const CanceledByUser: Self = Self(-4);
28    #[doc(alias = "TKErrorCodeAuthenticationFailed")]
29    pub const AuthenticationFailed: Self = Self(-5);
30    #[doc(alias = "TKErrorCodeObjectNotFound")]
31    pub const ObjectNotFound: Self = Self(-6);
32    #[doc(alias = "TKErrorCodeTokenNotFound")]
33    pub const TokenNotFound: Self = Self(-7);
34    #[doc(alias = "TKErrorCodeBadParameter")]
35    pub const BadParameter: Self = Self(-8);
36    #[doc(alias = "TKErrorCodeAuthenticationNeeded")]
37    pub const AuthenticationNeeded: Self = Self(-9);
38    #[deprecated]
39    pub const TKErrorAuthenticationFailed: Self = Self(TKErrorCode::AuthenticationFailed.0);
40    #[deprecated]
41    pub const TKErrorObjectNotFound: Self = Self(TKErrorCode::ObjectNotFound.0);
42    #[deprecated]
43    pub const TKErrorTokenNotFound: Self = Self(TKErrorCode::TokenNotFound.0);
44}
45
46unsafe impl Encode for TKErrorCode {
47    const ENCODING: Encoding = NSInteger::ENCODING;
48}
49
50unsafe impl RefEncode for TKErrorCode {
51    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
52}