objc2_local_authentication/generated/
LAEnvironmentMechanism.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/localauthentication/laenvironmentmechanism?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct LAEnvironmentMechanism;
14);
15
16unsafe impl Send for LAEnvironmentMechanism {}
17
18unsafe impl Sync for LAEnvironmentMechanism {}
19
20extern_conformance!(
21    unsafe impl NSObjectProtocol for LAEnvironmentMechanism {}
22);
23
24impl LAEnvironmentMechanism {
25    extern_methods!(
26        /// Clients should only consume environment mechanisms..
27        #[unsafe(method(new))]
28        #[unsafe(method_family = new)]
29        pub unsafe fn new() -> Retained<Self>;
30
31        /// The Clients should only consume environment mechanisms..
32        #[unsafe(method(init))]
33        #[unsafe(method_family = init)]
34        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
35
36        /// Whether the mechanism is available for use, i.e. whether the relevant preflight call of
37        /// `canEvaluatePolicy`would succeed.
38        ///
39        /// Warning: If
40        /// `isUsable`reads
41        /// `NO,`do not assume that it's because of some particular reason. You should check
42        /// properties of the subclass to determine why mechanism can't be used.
43        ///
44        /// This property is not atomic.
45        ///
46        /// # Safety
47        ///
48        /// This might not be thread-safe.
49        #[unsafe(method(isUsable))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn isUsable(&self) -> bool;
52
53        /// The localized name of the authentication mechanism, e.g. "Touch ID", "Face ID" etc.
54        ///
55        /// This property is not atomic.
56        ///
57        /// # Safety
58        ///
59        /// This might not be thread-safe.
60        #[unsafe(method(localizedName))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn localizedName(&self) -> Retained<NSString>;
63
64        /// Name of the SF Symbol representing this authentication mechanism.
65        ///
66        /// This property is not atomic.
67        ///
68        /// # Safety
69        ///
70        /// This might not be thread-safe.
71        #[unsafe(method(iconSystemName))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn iconSystemName(&self) -> Retained<NSString>;
74    );
75}