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
50
51
52
53
54
//! 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_class!(
/// Generic secret
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/localauthentication/lasecret?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct LASecret;
);
extern_conformance!(
unsafe impl NSObjectProtocol for LASecret {}
);
impl LASecret {
extern_methods!(
#[cfg(feature = "block2")]
/// Fetch stored data if any
///
/// 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.
///
/// # Safety
///
/// `handler` block must be sendable.
#[unsafe(method(loadDataWithCompletion:))]
#[unsafe(method_family = none)]
pub unsafe fn loadDataWithCompletion(
&self,
handler: &block2::DynBlock<dyn Fn(*mut NSData, *mut NSError)>,
);
/// Clients cannot create
/// `LASecret`instances directly. They typically obtain them from a
/// `LAPersistedRight`instance.
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
/// Clients cannot create
/// `LASecret`instances directly. They typically obtain them from a
/// `LAPersistedRight`instance.
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}