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:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn setStreet(&self, street: &NSString);
74
75 #[unsafe(method(subLocality))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn subLocality(&self) -> Retained<NSString>;
78
79 #[unsafe(method(setSubLocality:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setSubLocality(&self, sub_locality: &NSString);
83
84 #[unsafe(method(city))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn city(&self) -> Retained<NSString>;
87
88 #[unsafe(method(setCity:))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn setCity(&self, city: &NSString);
92
93 #[unsafe(method(subAdministrativeArea))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn subAdministrativeArea(&self) -> Retained<NSString>;
96
97 #[unsafe(method(setSubAdministrativeArea:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn setSubAdministrativeArea(&self, sub_administrative_area: &NSString);
101
102 #[unsafe(method(state))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn state(&self) -> Retained<NSString>;
105
106 #[unsafe(method(setState:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setState(&self, state: &NSString);
110
111 #[unsafe(method(postalCode))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn postalCode(&self) -> Retained<NSString>;
114
115 #[unsafe(method(setPostalCode:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn setPostalCode(&self, postal_code: &NSString);
119
120 #[unsafe(method(country))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn country(&self) -> Retained<NSString>;
123
124 #[unsafe(method(setCountry:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn setCountry(&self, country: &NSString);
128
129 #[unsafe(method(ISOCountryCode))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn ISOCountryCode(&self) -> Retained<NSString>;
132
133 #[unsafe(method(setISOCountryCode:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn setISOCountryCode(&self, iso_country_code: &NSString);
137 );
138}
139
140#[cfg(feature = "CNPostalAddress")]
142impl CNMutablePostalAddress {
143 extern_methods!(
144 #[unsafe(method(init))]
145 #[unsafe(method_family = init)]
146 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
147
148 #[unsafe(method(new))]
149 #[unsafe(method_family = new)]
150 pub unsafe fn new() -> Retained<Self>;
151 );
152}