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
22unsafe impl NSObjectProtocol for HMUser {}
23
24impl HMUser {
25    extern_methods!(
26        #[unsafe(method(init))]
27        #[unsafe(method_family = init)]
28        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
29
30        /// Name of the user.
31        #[unsafe(method(name))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn name(&self) -> Retained<NSString>;
34
35        /// A unique identifier for the user.
36        #[unsafe(method(uniqueIdentifier))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn uniqueIdentifier(&self) -> Retained<NSUUID>;
39    );
40}
41
42/// Methods declared on superclass `NSObject`.
43impl HMUser {
44    extern_methods!(
45        #[unsafe(method(new))]
46        #[unsafe(method_family = new)]
47        pub unsafe fn new() -> Retained<Self>;
48    );
49}