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 pub struct CLPlacemark;
17);
18
19unsafe impl Send for CLPlacemark {}
20
21unsafe impl Sync for CLPlacemark {}
22
23extern_conformance!(
24 unsafe impl NSCoding for CLPlacemark {}
25);
26
27extern_conformance!(
28 unsafe impl NSCopying for CLPlacemark {}
29);
30
31unsafe impl CopyingHelper for CLPlacemark {
32 type Result = Self;
33}
34
35extern_conformance!(
36 unsafe impl NSObjectProtocol for CLPlacemark {}
37);
38
39extern_conformance!(
40 unsafe impl NSSecureCoding for CLPlacemark {}
41);
42
43impl CLPlacemark {
44 extern_methods!(
45 #[unsafe(method(init))]
46 #[unsafe(method_family = init)]
47 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
48
49 #[unsafe(method(new))]
50 #[unsafe(method_family = new)]
51 pub unsafe fn new() -> Retained<Self>;
52
53 #[unsafe(method(initWithPlacemark:))]
54 #[unsafe(method_family = init)]
55 pub unsafe fn initWithPlacemark(
56 this: Allocated<Self>,
57 placemark: &CLPlacemark,
58 ) -> Retained<Self>;
59
60 #[cfg(feature = "CLLocation")]
61 #[unsafe(method(location))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn location(&self) -> Option<Retained<CLLocation>>;
64
65 #[cfg(feature = "CLRegion")]
66 #[unsafe(method(region))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
69
70 #[unsafe(method(timeZone))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
73
74 #[deprecated = "Use @properties"]
75 #[unsafe(method(addressDictionary))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn addressDictionary(&self) -> Option<Retained<NSDictionary>>;
78
79 #[unsafe(method(name))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn name(&self) -> Option<Retained<NSString>>;
82
83 #[unsafe(method(thoroughfare))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn thoroughfare(&self) -> Option<Retained<NSString>>;
86
87 #[unsafe(method(subThoroughfare))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn subThoroughfare(&self) -> Option<Retained<NSString>>;
90
91 #[unsafe(method(locality))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn locality(&self) -> Option<Retained<NSString>>;
94
95 #[unsafe(method(subLocality))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn subLocality(&self) -> Option<Retained<NSString>>;
98
99 #[unsafe(method(administrativeArea))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn administrativeArea(&self) -> Option<Retained<NSString>>;
102
103 #[unsafe(method(subAdministrativeArea))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn subAdministrativeArea(&self) -> Option<Retained<NSString>>;
106
107 #[unsafe(method(postalCode))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn postalCode(&self) -> Option<Retained<NSString>>;
110
111 #[unsafe(method(ISOcountryCode))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn ISOcountryCode(&self) -> Option<Retained<NSString>>;
114
115 #[unsafe(method(country))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn country(&self) -> Option<Retained<NSString>>;
118
119 #[unsafe(method(inlandWater))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn inlandWater(&self) -> Option<Retained<NSString>>;
122
123 #[unsafe(method(ocean))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn ocean(&self) -> Option<Retained<NSString>>;
126
127 #[unsafe(method(areasOfInterest))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn areasOfInterest(&self) -> Option<Retained<NSArray<NSString>>>;
130 );
131}
132
133impl CLPlacemark {
135 extern_methods!(
136 #[cfg(feature = "objc2-contacts")]
137 #[cfg(not(target_os = "tvos"))]
138 #[unsafe(method(postalAddress))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn postalAddress(&self) -> Option<Retained<CNPostalAddress>>;
141 );
142}