objc2_foundation/generated/
NSPersonNameComponents.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct NSPersonNameComponents;
14);
15
16#[cfg(feature = "NSObject")]
17unsafe impl NSCoding for NSPersonNameComponents {}
18
19#[cfg(feature = "NSObject")]
20unsafe impl NSCopying for NSPersonNameComponents {}
21
22#[cfg(feature = "NSObject")]
23unsafe impl CopyingHelper for NSPersonNameComponents {
24 type Result = Self;
25}
26
27unsafe impl NSObjectProtocol for NSPersonNameComponents {}
28
29#[cfg(feature = "NSObject")]
30unsafe impl NSSecureCoding for NSPersonNameComponents {}
31
32impl NSPersonNameComponents {
33 extern_methods!(
34 #[cfg(feature = "NSString")]
35 #[unsafe(method(namePrefix))]
36 #[unsafe(method_family = none)]
37 pub unsafe fn namePrefix(&self) -> Option<Retained<NSString>>;
38
39 #[cfg(feature = "NSString")]
40 #[unsafe(method(setNamePrefix:))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn setNamePrefix(&self, name_prefix: Option<&NSString>);
44
45 #[cfg(feature = "NSString")]
46 #[unsafe(method(givenName))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn givenName(&self) -> Option<Retained<NSString>>;
49
50 #[cfg(feature = "NSString")]
51 #[unsafe(method(setGivenName:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn setGivenName(&self, given_name: Option<&NSString>);
55
56 #[cfg(feature = "NSString")]
57 #[unsafe(method(middleName))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn middleName(&self) -> Option<Retained<NSString>>;
60
61 #[cfg(feature = "NSString")]
62 #[unsafe(method(setMiddleName:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setMiddleName(&self, middle_name: Option<&NSString>);
66
67 #[cfg(feature = "NSString")]
68 #[unsafe(method(familyName))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn familyName(&self) -> Option<Retained<NSString>>;
71
72 #[cfg(feature = "NSString")]
73 #[unsafe(method(setFamilyName:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn setFamilyName(&self, family_name: Option<&NSString>);
77
78 #[cfg(feature = "NSString")]
79 #[unsafe(method(nameSuffix))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn nameSuffix(&self) -> Option<Retained<NSString>>;
82
83 #[cfg(feature = "NSString")]
84 #[unsafe(method(setNameSuffix:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn setNameSuffix(&self, name_suffix: Option<&NSString>);
88
89 #[cfg(feature = "NSString")]
90 #[unsafe(method(nickname))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn nickname(&self) -> Option<Retained<NSString>>;
93
94 #[cfg(feature = "NSString")]
95 #[unsafe(method(setNickname:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn setNickname(&self, nickname: Option<&NSString>);
99
100 #[unsafe(method(phoneticRepresentation))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn phoneticRepresentation(&self) -> Option<Retained<NSPersonNameComponents>>;
103
104 #[unsafe(method(setPhoneticRepresentation:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setPhoneticRepresentation(
108 &self,
109 phonetic_representation: Option<&NSPersonNameComponents>,
110 );
111 );
112}
113
114impl NSPersonNameComponents {
116 extern_methods!(
117 #[unsafe(method(init))]
118 #[unsafe(method_family = init)]
119 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
120
121 #[unsafe(method(new))]
122 #[unsafe(method_family = new)]
123 pub unsafe fn new() -> Retained<Self>;
124 );
125}