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 unsafe fn namePrefix(&self) -> Option<Retained<NSString>>;
46
47 #[cfg(feature = "NSString")]
48 #[unsafe(method(setNamePrefix:))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn setNamePrefix(&self, name_prefix: Option<&NSString>);
52
53 #[cfg(feature = "NSString")]
54 #[unsafe(method(givenName))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn givenName(&self) -> Option<Retained<NSString>>;
57
58 #[cfg(feature = "NSString")]
59 #[unsafe(method(setGivenName:))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn setGivenName(&self, given_name: Option<&NSString>);
63
64 #[cfg(feature = "NSString")]
65 #[unsafe(method(middleName))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn middleName(&self) -> Option<Retained<NSString>>;
68
69 #[cfg(feature = "NSString")]
70 #[unsafe(method(setMiddleName:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setMiddleName(&self, middle_name: Option<&NSString>);
74
75 #[cfg(feature = "NSString")]
76 #[unsafe(method(familyName))]
77 #[unsafe(method_family = none)]
78 pub unsafe fn familyName(&self) -> Option<Retained<NSString>>;
79
80 #[cfg(feature = "NSString")]
81 #[unsafe(method(setFamilyName:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn setFamilyName(&self, family_name: Option<&NSString>);
85
86 #[cfg(feature = "NSString")]
87 #[unsafe(method(nameSuffix))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn nameSuffix(&self) -> Option<Retained<NSString>>;
90
91 #[cfg(feature = "NSString")]
92 #[unsafe(method(setNameSuffix:))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn setNameSuffix(&self, name_suffix: Option<&NSString>);
96
97 #[cfg(feature = "NSString")]
98 #[unsafe(method(nickname))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn nickname(&self) -> Option<Retained<NSString>>;
101
102 #[cfg(feature = "NSString")]
103 #[unsafe(method(setNickname:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn setNickname(&self, nickname: Option<&NSString>);
107
108 #[unsafe(method(phoneticRepresentation))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn phoneticRepresentation(&self) -> Option<Retained<NSPersonNameComponents>>;
111
112 #[unsafe(method(setPhoneticRepresentation:))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn setPhoneticRepresentation(
116 &self,
117 phonetic_representation: Option<&NSPersonNameComponents>,
118 );
119 );
120}
121
122impl NSPersonNameComponents {
124 extern_methods!(
125 #[unsafe(method(init))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
128
129 #[unsafe(method(new))]
130 #[unsafe(method_family = new)]
131 pub unsafe fn new() -> Retained<Self>;
132 );
133}