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
42
43
44
45
46
47
48
49
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
/// An ASCredentialIdentity is used to describe an identity that can use a service upon successful authentication.
/// Use this class to save entries into ASCredentialIdentityStore.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/ascredentialidentity?language=objc)
pub unsafe trait ASCredentialIdentity: NSObjectProtocol {
#[cfg(feature = "ASCredentialServiceIdentifier")]
/// Get the service identifier.
#[unsafe(method(serviceIdentifier))]
#[unsafe(method_family = none)]
unsafe fn serviceIdentifier(&self) -> Retained<ASCredentialServiceIdentifier>;
/// Get the user.
#[unsafe(method(user))]
#[unsafe(method_family = none)]
unsafe fn user(&self) -> Retained<NSString>;
/// Get the record identifier.
///
/// You can utilize the record identifier to uniquely identify the credential identity in your local database.
#[unsafe(method(recordIdentifier))]
#[unsafe(method_family = none)]
unsafe fn recordIdentifier(&self) -> Option<Retained<NSString>>;
/// Get or set the rank of the credential identity object.
///
/// The system may utilize the rank to decide which credential identity precedes the other
/// if two identities have the same service identifier. A credential identity with a larger rank value
/// precedes one with a smaller value if both credential identities have the same service identifier.
/// The default value of this property is 0.
#[unsafe(method(rank))]
#[unsafe(method_family = none)]
unsafe fn rank(&self) -> NSInteger;
/// Setter for [`rank`][Self::rank].
#[unsafe(method(setRank:))]
#[unsafe(method_family = none)]
unsafe fn setRank(&self, rank: NSInteger);
}
);