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
21unsafe impl NSCoding for CNPostalAddress {}
22
23unsafe impl NSCopying for CNPostalAddress {}
24
25unsafe impl CopyingHelper for CNPostalAddress {
26 type Result = Self;
27}
28
29unsafe impl NSMutableCopying for CNPostalAddress {}
30
31#[cfg(feature = "CNMutablePostalAddress")]
32unsafe impl MutableCopyingHelper for CNPostalAddress {
33 type Result = CNMutablePostalAddress;
34}
35
36unsafe impl NSObjectProtocol for CNPostalAddress {}
37
38unsafe impl NSSecureCoding for CNPostalAddress {}
39
40impl CNPostalAddress {
41 extern_methods!(
42 #[unsafe(method(street))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn street(&self) -> Retained<NSString>;
47
48 #[unsafe(method(subLocality))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn subLocality(&self) -> Retained<NSString>;
51
52 #[unsafe(method(city))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn city(&self) -> Retained<NSString>;
55
56 #[unsafe(method(subAdministrativeArea))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn subAdministrativeArea(&self) -> Retained<NSString>;
59
60 #[unsafe(method(state))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn state(&self) -> Retained<NSString>;
63
64 #[unsafe(method(postalCode))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn postalCode(&self) -> Retained<NSString>;
67
68 #[unsafe(method(country))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn country(&self) -> Retained<NSString>;
71
72 #[unsafe(method(ISOCountryCode))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn ISOCountryCode(&self) -> Retained<NSString>;
75
76 #[unsafe(method(localizedStringForKey:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn localizedStringForKey(key: &NSString) -> Retained<NSString>;
80 );
81}
82
83impl CNPostalAddress {
85 extern_methods!(
86 #[unsafe(method(init))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90 #[unsafe(method(new))]
91 #[unsafe(method_family = new)]
92 pub unsafe fn new() -> Retained<Self>;
93 );
94}
95
96extern "C" {
97 pub static CNPostalAddressStreetKey: &'static NSString;
99}
100
101extern "C" {
102 pub static CNPostalAddressSubLocalityKey: &'static NSString;
104}
105
106extern "C" {
107 pub static CNPostalAddressCityKey: &'static NSString;
109}
110
111extern "C" {
112 pub static CNPostalAddressSubAdministrativeAreaKey: &'static NSString;
114}
115
116extern "C" {
117 pub static CNPostalAddressStateKey: &'static NSString;
119}
120
121extern "C" {
122 pub static CNPostalAddressPostalCodeKey: &'static NSString;
124}
125
126extern "C" {
127 pub static CNPostalAddressCountryKey: &'static NSString;
129}
130
131extern "C" {
132 pub static CNPostalAddressISOCountryCodeKey: &'static NSString;
134}