objc2_authentication_services/generated/
ASAuthorizationError.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/authenticationservices/asauthorizationerrordomain?language=objc)
11    pub static ASAuthorizationErrorDomain: &'static NSErrorDomain;
12}
13
14/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationerror?language=objc)
15// NS_ERROR_ENUM
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct ASAuthorizationError(pub NSInteger);
19impl ASAuthorizationError {
20    #[doc(alias = "ASAuthorizationErrorUnknown")]
21    pub const Unknown: Self = Self(1000);
22    #[doc(alias = "ASAuthorizationErrorCanceled")]
23    pub const Canceled: Self = Self(1001);
24    #[doc(alias = "ASAuthorizationErrorInvalidResponse")]
25    pub const InvalidResponse: Self = Self(1002);
26    #[doc(alias = "ASAuthorizationErrorNotHandled")]
27    pub const NotHandled: Self = Self(1003);
28    #[doc(alias = "ASAuthorizationErrorFailed")]
29    pub const Failed: Self = Self(1004);
30    #[doc(alias = "ASAuthorizationErrorNotInteractive")]
31    pub const NotInteractive: Self = Self(1005);
32    /// This error should only be returned when specifying
33    /// `excludedCredentials`on a public key credential registration request.
34    #[doc(alias = "ASAuthorizationErrorMatchedExcludedCredential")]
35    pub const MatchedExcludedCredential: Self = Self(1006);
36    /// This error signals that the import request failed. Details will be available in the `userInfo` of the NSError.
37    #[doc(alias = "ASAuthorizationErrorCredentialImport")]
38    pub const CredentialImport: Self = Self(1007);
39    /// This error signals that the export request failed. Details will be available in the `userInfo` of the NSError.
40    #[doc(alias = "ASAuthorizationErrorCredentialExport")]
41    pub const CredentialExport: Self = Self(1008);
42}
43
44unsafe impl Encode for ASAuthorizationError {
45    const ENCODING: Encoding = NSInteger::ENCODING;
46}
47
48unsafe impl RefEncode for ASAuthorizationError {
49    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
50}