objc2_home_kit/generated/
HMUser.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    /// This class describes a user in the home.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/homekit/hmuser?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct HMUser;
16);
17
18unsafe impl Send for HMUser {}
19
20unsafe impl Sync for HMUser {}
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for HMUser {}
24);
25
26impl HMUser {
27    extern_methods!(
28        #[unsafe(method(init))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32        /// Name of the user.
33        ///
34        /// This property is not atomic.
35        ///
36        /// # Safety
37        ///
38        /// This might not be thread-safe.
39        #[unsafe(method(name))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn name(&self) -> Retained<NSString>;
42
43        /// A unique identifier for the user.
44        ///
45        /// This property is not atomic.
46        ///
47        /// # Safety
48        ///
49        /// This might not be thread-safe.
50        #[unsafe(method(uniqueIdentifier))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn uniqueIdentifier(&self) -> Retained<NSUUID>;
53    );
54}
55
56/// Methods declared on superclass `NSObject`.
57impl HMUser {
58    extern_methods!(
59        #[unsafe(method(new))]
60        #[unsafe(method_family = new)]
61        pub unsafe fn new() -> Retained<Self>;
62    );
63}