objc2-local-authentication 0.3.2

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

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/localauthentication/laenvironmentmechanismuserpassword?language=objc)
    #[unsafe(super(LAEnvironmentMechanism, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "LAEnvironmentMechanism")]
    pub struct LAEnvironmentMechanismUserPassword;
);

#[cfg(feature = "LAEnvironmentMechanism")]
unsafe impl Send for LAEnvironmentMechanismUserPassword {}

#[cfg(feature = "LAEnvironmentMechanism")]
unsafe impl Sync for LAEnvironmentMechanismUserPassword {}

#[cfg(feature = "LAEnvironmentMechanism")]
extern_conformance!(
    unsafe impl NSObjectProtocol for LAEnvironmentMechanismUserPassword {}
);

#[cfg(feature = "LAEnvironmentMechanism")]
impl LAEnvironmentMechanismUserPassword {
    extern_methods!(
        /// Whether the local user password or passcode is set on this device.
        ///
        /// This property is not atomic.
        ///
        /// # Safety
        ///
        /// This might not be thread-safe.
        #[unsafe(method(isSet))]
        #[unsafe(method_family = none)]
        pub unsafe fn isSet(&self) -> bool;
    );
}

/// Methods declared on superclass `LAEnvironmentMechanism`.
#[cfg(feature = "LAEnvironmentMechanism")]
impl LAEnvironmentMechanismUserPassword {
    extern_methods!(
        /// Clients should only consume environment mechanisms..
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        /// The Clients should only consume environment mechanisms..
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}