objc2_contacts/generated/
CNMutablePostalAddress.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(CNPostalAddress, NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 #[cfg(feature = "CNPostalAddress")]
23 pub struct CNMutablePostalAddress;
24);
25
26#[cfg(feature = "CNPostalAddress")]
27extern_conformance!(
28 unsafe impl NSCoding for CNMutablePostalAddress {}
29);
30
31#[cfg(feature = "CNPostalAddress")]
32extern_conformance!(
33 unsafe impl NSCopying for CNMutablePostalAddress {}
34);
35
36#[cfg(feature = "CNPostalAddress")]
37unsafe impl CopyingHelper for CNMutablePostalAddress {
38 type Result = CNPostalAddress;
39}
40
41#[cfg(feature = "CNPostalAddress")]
42extern_conformance!(
43 unsafe impl NSMutableCopying for CNMutablePostalAddress {}
44);
45
46#[cfg(feature = "CNPostalAddress")]
47unsafe impl MutableCopyingHelper for CNMutablePostalAddress {
48 type Result = Self;
49}
50
51#[cfg(feature = "CNPostalAddress")]
52extern_conformance!(
53 unsafe impl NSObjectProtocol for CNMutablePostalAddress {}
54);
55
56#[cfg(feature = "CNPostalAddress")]
57extern_conformance!(
58 unsafe impl NSSecureCoding for CNMutablePostalAddress {}
59);
60
61#[cfg(feature = "CNPostalAddress")]
62impl CNMutablePostalAddress {
63 extern_methods!(
64 #[unsafe(method(street))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn street(&self) -> Retained<NSString>;
69
70 #[unsafe(method(setStreet:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn setStreet(&self, street: &NSString);
76
77 #[unsafe(method(subLocality))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn subLocality(&self) -> Retained<NSString>;
80
81 #[unsafe(method(setSubLocality:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn setSubLocality(&self, sub_locality: &NSString);
87
88 #[unsafe(method(city))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn city(&self) -> Retained<NSString>;
91
92 #[unsafe(method(setCity:))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn setCity(&self, city: &NSString);
98
99 #[unsafe(method(subAdministrativeArea))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn subAdministrativeArea(&self) -> Retained<NSString>;
102
103 #[unsafe(method(setSubAdministrativeArea:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn setSubAdministrativeArea(&self, sub_administrative_area: &NSString);
109
110 #[unsafe(method(state))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn state(&self) -> Retained<NSString>;
113
114 #[unsafe(method(setState:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn setState(&self, state: &NSString);
120
121 #[unsafe(method(postalCode))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn postalCode(&self) -> Retained<NSString>;
124
125 #[unsafe(method(setPostalCode:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn setPostalCode(&self, postal_code: &NSString);
131
132 #[unsafe(method(country))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn country(&self) -> Retained<NSString>;
135
136 #[unsafe(method(setCountry:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setCountry(&self, country: &NSString);
142
143 #[unsafe(method(ISOCountryCode))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn ISOCountryCode(&self) -> Retained<NSString>;
146
147 #[unsafe(method(setISOCountryCode:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setISOCountryCode(&self, iso_country_code: &NSString);
153 );
154}
155
156#[cfg(feature = "CNPostalAddress")]
158impl CNMutablePostalAddress {
159 extern_methods!(
160 #[unsafe(method(init))]
161 #[unsafe(method_family = init)]
162 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
163
164 #[unsafe(method(new))]
165 #[unsafe(method_family = new)]
166 pub unsafe fn new() -> Retained<Self>;
167 );
168}