1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_app_kit::*;
use objc2_foundation::*;

use crate::*;

// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ASCredentialRequestType(pub NSInteger);
impl ASCredentialRequestType {
    #[doc(alias = "ASCredentialRequestTypePassword")]
    pub const Password: Self = Self(0);
    #[doc(alias = "ASCredentialRequestTypePasskeyAssertion")]
    pub const PasskeyAssertion: Self = Self(1);
}

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

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

extern_protocol!(
    pub unsafe trait ASCredentialRequest:
        NSCopying + NSObjectProtocol + NSSecureCoding
    {
        #[method(type)]
        unsafe fn r#type(&self) -> ASCredentialRequestType;

        #[cfg(feature = "ASCredentialIdentity")]
        #[method_id(@__retain_semantics Other credentialIdentity)]
        unsafe fn credentialIdentity(&self) -> Id<ProtocolObject<dyn ASCredentialIdentity>>;
    }

    unsafe impl ProtocolType for dyn ASCredentialRequest {}
);