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