objc2_authentication_services/generated/
ASExtensionErrors.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8extern "C" {
9    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asextensionerrordomain?language=objc)
10    pub static ASExtensionErrorDomain: Option<&'static NSErrorDomain>;
11}
12
13/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asextensionerrorcode?language=objc)
14// NS_ERROR_ENUM
15#[repr(transparent)]
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
17pub struct ASExtensionErrorCode(pub NSInteger);
18impl ASExtensionErrorCode {
19    #[doc(alias = "ASExtensionErrorCodeFailed")]
20    pub const Failed: Self = Self(0);
21    #[doc(alias = "ASExtensionErrorCodeUserCanceled")]
22    pub const UserCanceled: Self = Self(1);
23    #[doc(alias = "ASExtensionErrorCodeUserInteractionRequired")]
24    pub const UserInteractionRequired: Self = Self(100);
25    #[doc(alias = "ASExtensionErrorCodeCredentialIdentityNotFound")]
26    pub const CredentialIdentityNotFound: Self = Self(101);
27    /// This error should only be used for a passkey registration request, if the
28    /// `excludedCredentials`property matches a known passkey.
29    #[doc(alias = "ASExtensionErrorCodeMatchedExcludedCredential")]
30    pub const MatchedExcludedCredential: Self = Self(102);
31}
32
33unsafe impl Encode for ASExtensionErrorCode {
34    const ENCODING: Encoding = NSInteger::ENCODING;
35}
36
37unsafe impl RefEncode for ASExtensionErrorCode {
38    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
39}
40
41extern "C" {
42    /// A key that specifies an error string to be shown to the user when an extension request fails.
43    ///
44    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asextensionlocalizedfailurereasonerrorkey?language=objc)
45    pub static ASExtensionLocalizedFailureReasonErrorKey: Option<&'static NSErrorUserInfoKey>;
46}