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
21unsafe impl NSObjectProtocol for MKGeoJSONDecoder {}
22
23impl MKGeoJSONDecoder {
24 extern_methods!(
25 #[unsafe(method(geoJSONObjectsWithData:error:_))]
26 #[unsafe(method_family = none)]
27 pub unsafe fn geoJSONObjectsWithData_error(
28 &self,
29 data: &NSData,
30 ) -> Result<Retained<NSArray<ProtocolObject<dyn MKGeoJSONObject>>>, Retained<NSError>>;
31 );
32}
33
34impl MKGeoJSONDecoder {
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}
46
47extern_class!(
48 #[unsafe(super(NSObject))]
50 #[derive(Debug, PartialEq, Eq, Hash)]
51 pub struct MKGeoJSONFeature;
52);
53
54unsafe impl MKGeoJSONObject for MKGeoJSONFeature {}
55
56unsafe impl NSObjectProtocol for MKGeoJSONFeature {}
57
58impl MKGeoJSONFeature {
59 extern_methods!(
60 #[unsafe(method(identifier))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
63
64 #[unsafe(method(properties))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn properties(&self) -> Option<Retained<NSData>>;
67
68 #[cfg(feature = "MKShape")]
69 #[unsafe(method(geometry))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn geometry(&self) -> Retained<NSArray<MKShape>>;
72 );
73}
74
75impl MKGeoJSONFeature {
77 extern_methods!(
78 #[unsafe(method(init))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
81
82 #[unsafe(method(new))]
83 #[unsafe(method_family = new)]
84 pub unsafe fn new() -> Retained<Self>;
85 );
86}
87
88#[cfg(all(feature = "MKPointAnnotation", feature = "MKShape"))]
90impl MKPointAnnotation {
91 extern_methods!();
92}
93
94#[cfg(all(feature = "MKPointAnnotation", feature = "MKShape"))]
95unsafe impl MKGeoJSONObject for MKPointAnnotation {}
96
97#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
99impl MKMultiPoint {
100 extern_methods!();
101}
102
103#[cfg(all(feature = "MKMultiPoint", feature = "MKShape"))]
104unsafe impl MKGeoJSONObject for MKMultiPoint {}
105
106#[cfg(all(feature = "MKMultiPolyline", feature = "MKShape"))]
108impl MKMultiPolyline {
109 extern_methods!();
110}
111
112#[cfg(all(feature = "MKMultiPolyline", feature = "MKShape"))]
113unsafe impl MKGeoJSONObject for MKMultiPolyline {}
114
115#[cfg(all(feature = "MKMultiPolygon", feature = "MKShape"))]
117impl MKMultiPolygon {
118 extern_methods!();
119}
120
121#[cfg(all(feature = "MKMultiPolygon", feature = "MKShape"))]
122unsafe impl MKGeoJSONObject for MKMultiPolygon {}
123
124#[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
126impl MKPolyline {
127 extern_methods!();
128}
129
130#[cfg(all(feature = "MKMultiPoint", feature = "MKPolyline", feature = "MKShape"))]
131unsafe impl MKGeoJSONObject for MKPolyline {}
132
133#[cfg(all(feature = "MKMultiPoint", feature = "MKPolygon", feature = "MKShape"))]
135impl MKPolygon {
136 extern_methods!();
137}
138
139#[cfg(all(feature = "MKMultiPoint", feature = "MKPolygon", feature = "MKShape"))]
140unsafe impl MKGeoJSONObject for MKPolygon {}