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 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);
    }
);