objc2_map_kit/generated/
MKGeoJSONSerialization.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_protocol!(
10 pub unsafe trait MKGeoJSONObject: NSObjectProtocol {}
12);
13
14extern_class!(
15 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct MKGeoJSONDecoder;
19);
20
21extern_conformance!(
22 unsafe impl NSObjectProtocol for MKGeoJSONDecoder {}
23);
24
25impl MKGeoJSONDecoder {
26 extern_methods!(
27 #[unsafe(method(geoJSONObjectsWithData:error:_))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn geoJSONObjectsWithData_error(
30 &self,
31 data: &NSData,
32 ) -> Result<Retained<NSArray<ProtocolObject<dyn MKGeoJSONObject>>>, Retained<NSError>>;
33 );
34}
35
36impl MKGeoJSONDecoder {
38 extern_methods!(
39 #[unsafe(method(init))]
40 #[unsafe(method_family = init)]
41 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
42
43 #[unsafe(method(new))]
44 #[unsafe(method_family = new)]
45 pub unsafe fn new() -> Retained<Self>;
46 );
47}
48
49extern_class!(
50 #[unsafe(super(NSObject))]
52 #[derive(Debug, PartialEq, Eq, Hash)]
53 pub struct MKGeoJSONFeature;
54);
55
56extern_conformance!(
57 unsafe impl MKGeoJSONObject for MKGeoJSONFeature {}
58);
59
60extern_conformance!(
61 unsafe impl NSObjectProtocol for MKGeoJSONFeature {}
62);
63
64impl MKGeoJSONFeature {
65 extern_methods!(
66 #[unsafe(method(identifier))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
69
70 #[unsafe(method(properties))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn properties(&self) -> Option<Retained<NSData>>;
73
74 #[cfg(feature = "MKShape")]
75 #[unsafe(method(geometry))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn geometry(&self) -> Retained<NSArray<MKShape>>;
78 );
79}
80
81impl MKGeoJSONFeature {
83 extern_methods!(
84 #[unsafe(method(init))]
85 #[unsafe(method_family = init)]
86 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88 #[unsafe(method(new))]
89 #[unsafe(method_family = new)]
90 pub unsafe fn new() -> Retained<Self>;
91 );
92}
93
94#[cfg(all(feature = "MKPointAnnotation", feature = "MKShape"))]
96impl MKPointAnnotation {
97 extern_methods!();
98}
99
100#[cfg(all(feature = "MKPointAnnotation", feature = "MKShape"))]
101extern_conformance!(
102 unsafe impl MKGeoJSONObject for MKPointAnnotation {}
103);
104
105#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
107impl MKMultiPoint {
108 extern_methods!();
109}
110
111#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
112extern_conformance!(
113 unsafe impl MKGeoJSONObject for MKMultiPoint {}
114);
115
116#[cfg(all(feature = "MKMultiPolyline", feature = "MKShape"))]
118impl MKMultiPolyline {
119 extern_methods!();
120}
121
122#[cfg(all(feature = "MKMultiPolyline", feature = "MKShape"))]
123extern_conformance!(
124 unsafe impl MKGeoJSONObject for MKMultiPolyline {}
125);
126
127#[cfg(all(feature = "MKMultiPolygon", feature = "MKShape"))]
129impl MKMultiPolygon {
130 extern_methods!();
131}
132
133#[cfg(all(feature = "MKMultiPolygon", feature = "MKShape"))]
134extern_conformance!(
135 unsafe impl MKGeoJSONObject for MKMultiPolygon {}
136);
137
138#[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
140impl MKPolyline {
141 extern_methods!();
142}
143
144#[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
145extern_conformance!(
146 unsafe impl MKGeoJSONObject for MKPolyline {}
147);
148
149#[cfg(all(feature = "MKMultiPoint", feature = "MKPolygon", feature = "MKShape"))]
151impl MKPolygon {
152 extern_methods!();
153}
154
155#[cfg(all(feature = "MKMultiPoint", feature = "MKPolygon", feature = "MKShape"))]
156extern_conformance!(
157 unsafe impl MKGeoJSONObject for MKPolygon {}
158);