objc2_local_authentication/generated/LASecret.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 /// Generic secret
12 ///
13 /// See also [Apple's documentation](https://developer.apple.com/documentation/localauthentication/lasecret?language=objc)
14 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct LASecret;
17);
18
19unsafe impl NSObjectProtocol for LASecret {}
20
21impl LASecret {
22 extern_methods!(
23 #[cfg(feature = "block2")]
24 /// Fetch stored data if any
25 ///
26 /// Parameter `handler`: Completion handler invoked with a generic secret stored along with the right or an error if no secret is found or the fetch operation fails.
27 #[unsafe(method(loadDataWithCompletion:))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn loadDataWithCompletion(
30 &self,
31 handler: &block2::Block<dyn Fn(*mut NSData, *mut NSError)>,
32 );
33
34 /// Clients cannot create
35 /// `LASecret`instances directly. They typically obtain them from a
36 /// `LAPersistedRight`instance.
37 #[unsafe(method(new))]
38 #[unsafe(method_family = new)]
39 pub unsafe fn new() -> Retained<Self>;
40
41 /// Clients cannot create
42 /// `LASecret`instances directly. They typically obtain them from a
43 /// `LAPersistedRight`instance.
44 #[unsafe(method(init))]
45 #[unsafe(method_family = init)]
46 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47 );
48}