objc2_contacts/generated/
CNPostalAddress.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct CNPostalAddress;
19);
20
21extern_conformance!(
22 unsafe impl NSCoding for CNPostalAddress {}
23);
24
25extern_conformance!(
26 unsafe impl NSCopying for CNPostalAddress {}
27);
28
29unsafe impl CopyingHelper for CNPostalAddress {
30 type Result = Self;
31}
32
33extern_conformance!(
34 unsafe impl NSMutableCopying for CNPostalAddress {}
35);
36
37#[cfg(feature = "CNMutablePostalAddress")]
38unsafe impl MutableCopyingHelper for CNPostalAddress {
39 type Result = CNMutablePostalAddress;
40}
41
42extern_conformance!(
43 unsafe impl NSObjectProtocol for CNPostalAddress {}
44);
45
46extern_conformance!(
47 unsafe impl NSSecureCoding for CNPostalAddress {}
48);
49
50impl CNPostalAddress {
51 extern_methods!(
52 #[unsafe(method(street))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn street(&self) -> Retained<NSString>;
57
58 #[unsafe(method(subLocality))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn subLocality(&self) -> Retained<NSString>;
61
62 #[unsafe(method(city))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn city(&self) -> Retained<NSString>;
65
66 #[unsafe(method(subAdministrativeArea))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn subAdministrativeArea(&self) -> Retained<NSString>;
69
70 #[unsafe(method(state))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn state(&self) -> Retained<NSString>;
73
74 #[unsafe(method(postalCode))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn postalCode(&self) -> Retained<NSString>;
77
78 #[unsafe(method(country))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn country(&self) -> Retained<NSString>;
81
82 #[unsafe(method(ISOCountryCode))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn ISOCountryCode(&self) -> Retained<NSString>;
85
86 #[unsafe(method(localizedStringForKey:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn localizedStringForKey(key: &NSString) -> Retained<NSString>;
90 );
91}
92
93impl CNPostalAddress {
95 extern_methods!(
96 #[unsafe(method(init))]
97 #[unsafe(method_family = init)]
98 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100 #[unsafe(method(new))]
101 #[unsafe(method_family = new)]
102 pub unsafe fn new() -> Retained<Self>;
103 );
104}
105
106extern "C" {
107 pub static CNPostalAddressStreetKey: &'static NSString;
109}
110
111extern "C" {
112 pub static CNPostalAddressSubLocalityKey: &'static NSString;
114}
115
116extern "C" {
117 pub static CNPostalAddressCityKey: &'static NSString;
119}
120
121extern "C" {
122 pub static CNPostalAddressSubAdministrativeAreaKey: &'static NSString;
124}
125
126extern "C" {
127 pub static CNPostalAddressStateKey: &'static NSString;
129}
130
131extern "C" {
132 pub static CNPostalAddressPostalCodeKey: &'static NSString;
134}
135
136extern "C" {
137 pub static CNPostalAddressCountryKey: &'static NSString;
139}
140
141extern "C" {
142 pub static CNPostalAddressISOCountryCodeKey: &'static NSString;
144}