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")]
17extern_conformance!(
18 unsafe impl NSCoding for NSPersonNameComponents {}
19);
20
21#[cfg(feature = "NSObject")]
22extern_conformance!(
23 unsafe impl NSCopying for NSPersonNameComponents {}
24);
25
26#[cfg(feature = "NSObject")]
27unsafe impl CopyingHelper for NSPersonNameComponents {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSObjectProtocol for NSPersonNameComponents {}
33);
34
35#[cfg(feature = "NSObject")]
36extern_conformance!(
37 unsafe impl NSSecureCoding for NSPersonNameComponents {}
38);
39
40impl NSPersonNameComponents {
41 extern_methods!(
42 #[cfg(feature = "NSString")]
43 #[unsafe(method(namePrefix))]
44 #[unsafe(method_family = none)]
45 pub fn namePrefix(&self) -> Option<Retained<NSString>>;
46
47 #[cfg(feature = "NSString")]
48 #[unsafe(method(setNamePrefix:))]
52 #[unsafe(method_family = none)]
53 pub fn setNamePrefix(&self, name_prefix: Option<&NSString>);
54
55 #[cfg(feature = "NSString")]
56 #[unsafe(method(givenName))]
57 #[unsafe(method_family = none)]
58 pub fn givenName(&self) -> Option<Retained<NSString>>;
59
60 #[cfg(feature = "NSString")]
61 #[unsafe(method(setGivenName:))]
65 #[unsafe(method_family = none)]
66 pub fn setGivenName(&self, given_name: Option<&NSString>);
67
68 #[cfg(feature = "NSString")]
69 #[unsafe(method(middleName))]
70 #[unsafe(method_family = none)]
71 pub fn middleName(&self) -> Option<Retained<NSString>>;
72
73 #[cfg(feature = "NSString")]
74 #[unsafe(method(setMiddleName:))]
78 #[unsafe(method_family = none)]
79 pub fn setMiddleName(&self, middle_name: Option<&NSString>);
80
81 #[cfg(feature = "NSString")]
82 #[unsafe(method(familyName))]
83 #[unsafe(method_family = none)]
84 pub fn familyName(&self) -> Option<Retained<NSString>>;
85
86 #[cfg(feature = "NSString")]
87 #[unsafe(method(setFamilyName:))]
91 #[unsafe(method_family = none)]
92 pub fn setFamilyName(&self, family_name: Option<&NSString>);
93
94 #[cfg(feature = "NSString")]
95 #[unsafe(method(nameSuffix))]
96 #[unsafe(method_family = none)]
97 pub fn nameSuffix(&self) -> Option<Retained<NSString>>;
98
99 #[cfg(feature = "NSString")]
100 #[unsafe(method(setNameSuffix:))]
104 #[unsafe(method_family = none)]
105 pub fn setNameSuffix(&self, name_suffix: Option<&NSString>);
106
107 #[cfg(feature = "NSString")]
108 #[unsafe(method(nickname))]
109 #[unsafe(method_family = none)]
110 pub fn nickname(&self) -> Option<Retained<NSString>>;
111
112 #[cfg(feature = "NSString")]
113 #[unsafe(method(setNickname:))]
117 #[unsafe(method_family = none)]
118 pub fn setNickname(&self, nickname: Option<&NSString>);
119
120 #[unsafe(method(phoneticRepresentation))]
121 #[unsafe(method_family = none)]
122 pub fn phoneticRepresentation(&self) -> Option<Retained<NSPersonNameComponents>>;
123
124 #[unsafe(method(setPhoneticRepresentation:))]
128 #[unsafe(method_family = none)]
129 pub fn setPhoneticRepresentation(
130 &self,
131 phonetic_representation: Option<&NSPersonNameComponents>,
132 );
133 );
134}
135
136impl NSPersonNameComponents {
138 extern_methods!(
139 #[unsafe(method(init))]
140 #[unsafe(method_family = init)]
141 pub fn init(this: Allocated<Self>) -> Retained<Self>;
142
143 #[unsafe(method(new))]
144 #[unsafe(method_family = new)]
145 pub fn new() -> Retained<Self>;
146 );
147}
148
149impl DefaultRetained for NSPersonNameComponents {
150 #[inline]
151 fn default_retained() -> Retained<Self> {
152 Self::new()
153 }
154}