objc2_core_location/generated/
CLPlacemark.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-contacts")]
6#[cfg(not(target_os = "tvos"))]
7use objc2_contacts::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
17 pub struct CLPlacemark;
18);
19
20unsafe impl Send for CLPlacemark {}
21
22unsafe impl Sync for CLPlacemark {}
23
24extern_conformance!(
25 unsafe impl NSCoding for CLPlacemark {}
26);
27
28extern_conformance!(
29 unsafe impl NSCopying for CLPlacemark {}
30);
31
32unsafe impl CopyingHelper for CLPlacemark {
33 type Result = Self;
34}
35
36extern_conformance!(
37 unsafe impl NSObjectProtocol for CLPlacemark {}
38);
39
40extern_conformance!(
41 unsafe impl NSSecureCoding for CLPlacemark {}
42);
43
44impl CLPlacemark {
45 extern_methods!(
46 #[unsafe(method(init))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50 #[unsafe(method(new))]
51 #[unsafe(method_family = new)]
52 pub unsafe fn new() -> Retained<Self>;
53
54 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
55 #[unsafe(method(initWithPlacemark:))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn initWithPlacemark(
58 this: Allocated<Self>,
59 placemark: &CLPlacemark,
60 ) -> Retained<Self>;
61
62 #[cfg(feature = "CLLocation")]
63 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
69 #[unsafe(method(location))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
72
73 #[cfg(feature = "CLRegion")]
74 #[unsafe(method(region))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
82
83 #[unsafe(method(timeZone))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
91
92 #[deprecated = "Use @properties"]
98 #[unsafe(method(addressDictionary))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn addressDictionary(&self) -> Option<Retained<NSDictionary>>;
101
102 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
108 #[unsafe(method(name))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn name(&self) -> Option<Retained<NSString>>;
111
112 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
118 #[unsafe(method(thoroughfare))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn thoroughfare(&self) -> Option<Retained<NSString>>;
121
122 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
128 #[unsafe(method(subThoroughfare))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn subThoroughfare(&self) -> Option<Retained<NSString>>;
131
132 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
138 #[unsafe(method(locality))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn locality(&self) -> Option<Retained<NSString>>;
141
142 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
148 #[unsafe(method(subLocality))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn subLocality(&self) -> Option<Retained<NSString>>;
151
152 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
158 #[unsafe(method(administrativeArea))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn administrativeArea(&self) -> Option<Retained<NSString>>;
161
162 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
168 #[unsafe(method(subAdministrativeArea))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn subAdministrativeArea(&self) -> Option<Retained<NSString>>;
171
172 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
178 #[unsafe(method(postalCode))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn postalCode(&self) -> Option<Retained<NSString>>;
181
182 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
188 #[unsafe(method(ISOcountryCode))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn ISOcountryCode(&self) -> Option<Retained<NSString>>;
191
192 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
198 #[unsafe(method(country))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn country(&self) -> Option<Retained<NSString>>;
201
202 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
208 #[unsafe(method(inlandWater))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn inlandWater(&self) -> Option<Retained<NSString>>;
211
212 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
218 #[unsafe(method(ocean))]
219 #[unsafe(method_family = none)]
220 pub unsafe fn ocean(&self) -> Option<Retained<NSString>>;
221
222 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
228 #[unsafe(method(areasOfInterest))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn areasOfInterest(&self) -> Option<Retained<NSArray<NSString>>>;
231 );
232}
233
234#[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
236impl CLPlacemark {
237 extern_methods!(
238 #[cfg(feature = "objc2-contacts")]
239 #[cfg(not(target_os = "tvos"))]
240 #[deprecated = "Use either GeoToolbox.PlaceDescriptor or MapKit"]
246 #[unsafe(method(postalAddress))]
247 #[unsafe(method_family = none)]
248 pub unsafe fn postalAddress(&self) -> Option<Retained<CNPostalAddress>>;
249 );
250}