objc2-authentication-services 0.3.2

Bindings to the AuthenticationServices framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asextensionerrordomain?language=objc)
    pub static ASExtensionErrorDomain: Option<&'static NSErrorDomain>;
}

/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asextensionerrorcode?language=objc)
// NS_ERROR_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ASExtensionErrorCode(pub NSInteger);
impl ASExtensionErrorCode {
    #[doc(alias = "ASExtensionErrorCodeFailed")]
    pub const Failed: Self = Self(0);
    #[doc(alias = "ASExtensionErrorCodeUserCanceled")]
    pub const UserCanceled: Self = Self(1);
    #[doc(alias = "ASExtensionErrorCodeUserInteractionRequired")]
    pub const UserInteractionRequired: Self = Self(100);
    #[doc(alias = "ASExtensionErrorCodeCredentialIdentityNotFound")]
    pub const CredentialIdentityNotFound: Self = Self(101);
    /// This error should only be used for a passkey registration request, if the
    /// `excludedCredentials`property matches a known passkey.
    #[doc(alias = "ASExtensionErrorCodeMatchedExcludedCredential")]
    pub const MatchedExcludedCredential: Self = Self(102);
}

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

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

extern "C" {
    /// A key that specifies an error string to be shown to the user when an extension request fails.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asextensionlocalizedfailurereasonerrorkey?language=objc)
    pub static ASExtensionLocalizedFailureReasonErrorKey: Option<&'static NSErrorUserInfoKey>;
}