1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9use objc2_core_graphics::*;
10#[cfg(feature = "objc2-core-image")]
11use objc2_core_image::*;
12#[cfg(feature = "objc2-core-media")]
13use objc2_core_media::*;
14#[cfg(feature = "objc2-core-ml")]
15use objc2_core_ml::*;
16#[cfg(feature = "objc2-core-video")]
17use objc2_core_video::*;
18use objc2_foundation::*;
19
20use crate::*;
21
22extern_class!(
23 #[unsafe(super(NSObject))]
27 #[derive(Debug, PartialEq, Eq, Hash)]
28 pub struct VNObservation;
29);
30
31extern_conformance!(
32 unsafe impl NSCoding for VNObservation {}
33);
34
35extern_conformance!(
36 unsafe impl NSCopying for VNObservation {}
37);
38
39unsafe impl CopyingHelper for VNObservation {
40 type Result = Self;
41}
42
43extern_conformance!(
44 unsafe impl NSObjectProtocol for VNObservation {}
45);
46
47extern_conformance!(
48 unsafe impl NSSecureCoding for VNObservation {}
49);
50
51#[cfg(feature = "VNRequestRevisionProviding")]
52extern_conformance!(
53 unsafe impl VNRequestRevisionProviding for VNObservation {}
54);
55
56impl VNObservation {
57 extern_methods!(
58 #[unsafe(method(uuid))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn uuid(&self) -> Retained<NSUUID>;
62
63 #[cfg(feature = "VNTypes")]
64 #[unsafe(method(confidence))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn confidence(&self) -> VNConfidence;
70
71 #[cfg(feature = "objc2-core-media")]
72 #[unsafe(method(timeRange))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn timeRange(&self) -> CMTimeRange;
78 );
79}
80
81impl VNObservation {
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
94extern_class!(
95 #[unsafe(super(VNObservation, NSObject))]
101 #[derive(Debug, PartialEq, Eq, Hash)]
102 pub struct VNDetectedObjectObservation;
103);
104
105extern_conformance!(
106 unsafe impl NSCoding for VNDetectedObjectObservation {}
107);
108
109extern_conformance!(
110 unsafe impl NSCopying for VNDetectedObjectObservation {}
111);
112
113unsafe impl CopyingHelper for VNDetectedObjectObservation {
114 type Result = Self;
115}
116
117extern_conformance!(
118 unsafe impl NSObjectProtocol for VNDetectedObjectObservation {}
119);
120
121extern_conformance!(
122 unsafe impl NSSecureCoding for VNDetectedObjectObservation {}
123);
124
125#[cfg(feature = "VNRequestRevisionProviding")]
126extern_conformance!(
127 unsafe impl VNRequestRevisionProviding for VNDetectedObjectObservation {}
128);
129
130impl VNDetectedObjectObservation {
131 extern_methods!(
132 #[cfg(feature = "objc2-core-foundation")]
133 #[unsafe(method(observationWithBoundingBox:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
137
138 #[cfg(feature = "objc2-core-foundation")]
139 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn observationWithRequestRevision_boundingBox(
142 request_revision: NSUInteger,
143 bounding_box: CGRect,
144 ) -> Retained<Self>;
145
146 #[cfg(feature = "objc2-core-foundation")]
147 #[unsafe(method(boundingBox))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn boundingBox(&self) -> CGRect;
151
152 #[unsafe(method(globalSegmentationMask))]
154 #[unsafe(method_family = none)]
155 pub unsafe fn globalSegmentationMask(&self) -> Option<Retained<VNPixelBufferObservation>>;
156 );
157}
158
159impl VNDetectedObjectObservation {
161 extern_methods!(
162 #[unsafe(method(init))]
163 #[unsafe(method_family = init)]
164 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
165
166 #[unsafe(method(new))]
167 #[unsafe(method_family = new)]
168 pub unsafe fn new() -> Retained<Self>;
169 );
170}
171
172extern_class!(
173 #[unsafe(super(VNDetectedObjectObservation, VNObservation, NSObject))]
179 #[derive(Debug, PartialEq, Eq, Hash)]
180 pub struct VNFaceObservation;
181);
182
183extern_conformance!(
184 unsafe impl NSCoding for VNFaceObservation {}
185);
186
187extern_conformance!(
188 unsafe impl NSCopying for VNFaceObservation {}
189);
190
191unsafe impl CopyingHelper for VNFaceObservation {
192 type Result = Self;
193}
194
195extern_conformance!(
196 unsafe impl NSObjectProtocol for VNFaceObservation {}
197);
198
199extern_conformance!(
200 unsafe impl NSSecureCoding for VNFaceObservation {}
201);
202
203#[cfg(feature = "VNRequestRevisionProviding")]
204extern_conformance!(
205 unsafe impl VNRequestRevisionProviding for VNFaceObservation {}
206);
207
208impl VNFaceObservation {
209 extern_methods!(
210 #[cfg(feature = "objc2-core-foundation")]
211 #[deprecated]
221 #[unsafe(method(faceObservationWithRequestRevision:boundingBox:roll:yaw:))]
222 #[unsafe(method_family = none)]
223 pub unsafe fn faceObservationWithRequestRevision_boundingBox_roll_yaw(
224 request_revision: NSUInteger,
225 bounding_box: CGRect,
226 roll: Option<&NSNumber>,
227 yaw: Option<&NSNumber>,
228 ) -> Retained<Self>;
229
230 #[cfg(feature = "objc2-core-foundation")]
231 #[unsafe(method(faceObservationWithRequestRevision:boundingBox:roll:yaw:pitch:))]
232 #[unsafe(method_family = none)]
233 pub unsafe fn faceObservationWithRequestRevision_boundingBox_roll_yaw_pitch(
234 request_revision: NSUInteger,
235 bounding_box: CGRect,
236 roll: Option<&NSNumber>,
237 yaw: Option<&NSNumber>,
238 pitch: Option<&NSNumber>,
239 ) -> Retained<Self>;
240
241 #[cfg(feature = "VNFaceLandmarks")]
242 #[unsafe(method(landmarks))]
244 #[unsafe(method_family = none)]
245 pub unsafe fn landmarks(&self) -> Option<Retained<VNFaceLandmarks2D>>;
246
247 #[unsafe(method(faceCaptureQuality))]
249 #[unsafe(method_family = none)]
250 pub unsafe fn faceCaptureQuality(&self) -> Option<Retained<NSNumber>>;
251
252 #[unsafe(method(roll))]
254 #[unsafe(method_family = none)]
255 pub unsafe fn roll(&self) -> Option<Retained<NSNumber>>;
256
257 #[unsafe(method(yaw))]
259 #[unsafe(method_family = none)]
260 pub unsafe fn yaw(&self) -> Option<Retained<NSNumber>>;
261
262 #[unsafe(method(pitch))]
264 #[unsafe(method_family = none)]
265 pub unsafe fn pitch(&self) -> Option<Retained<NSNumber>>;
266 );
267}
268
269impl VNFaceObservation {
271 extern_methods!(
272 #[cfg(feature = "objc2-core-foundation")]
273 #[unsafe(method(observationWithBoundingBox:))]
275 #[unsafe(method_family = none)]
276 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
277
278 #[cfg(feature = "objc2-core-foundation")]
279 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
280 #[unsafe(method_family = none)]
281 pub unsafe fn observationWithRequestRevision_boundingBox(
282 request_revision: NSUInteger,
283 bounding_box: CGRect,
284 ) -> Retained<Self>;
285 );
286}
287
288impl VNFaceObservation {
290 extern_methods!(
291 #[unsafe(method(init))]
292 #[unsafe(method_family = init)]
293 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
294
295 #[unsafe(method(new))]
296 #[unsafe(method_family = new)]
297 pub unsafe fn new() -> Retained<Self>;
298 );
299}
300
301extern_class!(
302 #[unsafe(super(VNObservation, NSObject))]
308 #[derive(Debug, PartialEq, Eq, Hash)]
309 pub struct VNClassificationObservation;
310);
311
312extern_conformance!(
313 unsafe impl NSCoding for VNClassificationObservation {}
314);
315
316extern_conformance!(
317 unsafe impl NSCopying for VNClassificationObservation {}
318);
319
320unsafe impl CopyingHelper for VNClassificationObservation {
321 type Result = Self;
322}
323
324extern_conformance!(
325 unsafe impl NSObjectProtocol for VNClassificationObservation {}
326);
327
328extern_conformance!(
329 unsafe impl NSSecureCoding for VNClassificationObservation {}
330);
331
332#[cfg(feature = "VNRequestRevisionProviding")]
333extern_conformance!(
334 unsafe impl VNRequestRevisionProviding for VNClassificationObservation {}
335);
336
337impl VNClassificationObservation {
338 extern_methods!(
339 #[unsafe(method(identifier))]
341 #[unsafe(method_family = none)]
342 pub unsafe fn identifier(&self) -> Retained<NSString>;
343 );
344}
345
346impl VNClassificationObservation {
348 extern_methods!(
349 #[unsafe(method(init))]
350 #[unsafe(method_family = init)]
351 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
352
353 #[unsafe(method(new))]
354 #[unsafe(method_family = new)]
355 pub unsafe fn new() -> Retained<Self>;
356 );
357}
358
359impl VNClassificationObservation {
365 extern_methods!(
366 #[unsafe(method(hasPrecisionRecallCurve))]
370 #[unsafe(method_family = none)]
371 pub unsafe fn hasPrecisionRecallCurve(&self) -> bool;
372
373 #[unsafe(method(hasMinimumRecall:forPrecision:))]
384 #[unsafe(method_family = none)]
385 pub unsafe fn hasMinimumRecall_forPrecision(
386 &self,
387 minimum_recall: c_float,
388 precision: c_float,
389 ) -> bool;
390
391 #[unsafe(method(hasMinimumPrecision:forRecall:))]
402 #[unsafe(method_family = none)]
403 pub unsafe fn hasMinimumPrecision_forRecall(
404 &self,
405 minimum_precision: c_float,
406 recall: c_float,
407 ) -> bool;
408 );
409}
410
411extern_class!(
412 #[unsafe(super(VNDetectedObjectObservation, VNObservation, NSObject))]
416 #[derive(Debug, PartialEq, Eq, Hash)]
417 pub struct VNRecognizedObjectObservation;
418);
419
420extern_conformance!(
421 unsafe impl NSCoding for VNRecognizedObjectObservation {}
422);
423
424extern_conformance!(
425 unsafe impl NSCopying for VNRecognizedObjectObservation {}
426);
427
428unsafe impl CopyingHelper for VNRecognizedObjectObservation {
429 type Result = Self;
430}
431
432extern_conformance!(
433 unsafe impl NSObjectProtocol for VNRecognizedObjectObservation {}
434);
435
436extern_conformance!(
437 unsafe impl NSSecureCoding for VNRecognizedObjectObservation {}
438);
439
440#[cfg(feature = "VNRequestRevisionProviding")]
441extern_conformance!(
442 unsafe impl VNRequestRevisionProviding for VNRecognizedObjectObservation {}
443);
444
445impl VNRecognizedObjectObservation {
446 extern_methods!(
447 #[unsafe(method(labels))]
448 #[unsafe(method_family = none)]
449 pub unsafe fn labels(&self) -> Retained<NSArray<VNClassificationObservation>>;
450 );
451}
452
453impl VNRecognizedObjectObservation {
455 extern_methods!(
456 #[cfg(feature = "objc2-core-foundation")]
457 #[unsafe(method(observationWithBoundingBox:))]
459 #[unsafe(method_family = none)]
460 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
461
462 #[cfg(feature = "objc2-core-foundation")]
463 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
464 #[unsafe(method_family = none)]
465 pub unsafe fn observationWithRequestRevision_boundingBox(
466 request_revision: NSUInteger,
467 bounding_box: CGRect,
468 ) -> Retained<Self>;
469 );
470}
471
472impl VNRecognizedObjectObservation {
474 extern_methods!(
475 #[unsafe(method(init))]
476 #[unsafe(method_family = init)]
477 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
478
479 #[unsafe(method(new))]
480 #[unsafe(method_family = new)]
481 pub unsafe fn new() -> Retained<Self>;
482 );
483}
484
485extern_class!(
486 #[unsafe(super(VNObservation, NSObject))]
492 #[derive(Debug, PartialEq, Eq, Hash)]
493 pub struct VNCoreMLFeatureValueObservation;
494);
495
496extern_conformance!(
497 unsafe impl NSCoding for VNCoreMLFeatureValueObservation {}
498);
499
500extern_conformance!(
501 unsafe impl NSCopying for VNCoreMLFeatureValueObservation {}
502);
503
504unsafe impl CopyingHelper for VNCoreMLFeatureValueObservation {
505 type Result = Self;
506}
507
508extern_conformance!(
509 unsafe impl NSObjectProtocol for VNCoreMLFeatureValueObservation {}
510);
511
512extern_conformance!(
513 unsafe impl NSSecureCoding for VNCoreMLFeatureValueObservation {}
514);
515
516#[cfg(feature = "VNRequestRevisionProviding")]
517extern_conformance!(
518 unsafe impl VNRequestRevisionProviding for VNCoreMLFeatureValueObservation {}
519);
520
521impl VNCoreMLFeatureValueObservation {
522 extern_methods!(
523 #[cfg(feature = "objc2-core-ml")]
524 #[unsafe(method(featureValue))]
526 #[unsafe(method_family = none)]
527 pub unsafe fn featureValue(&self) -> Retained<MLFeatureValue>;
528
529 #[unsafe(method(featureName))]
531 #[unsafe(method_family = none)]
532 pub unsafe fn featureName(&self) -> Retained<NSString>;
533 );
534}
535
536impl VNCoreMLFeatureValueObservation {
538 extern_methods!(
539 #[unsafe(method(init))]
540 #[unsafe(method_family = init)]
541 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
542
543 #[unsafe(method(new))]
544 #[unsafe(method_family = new)]
545 pub unsafe fn new() -> Retained<Self>;
546 );
547}
548
549extern_class!(
550 #[unsafe(super(VNObservation, NSObject))]
556 #[derive(Debug, PartialEq, Eq, Hash)]
557 pub struct VNPixelBufferObservation;
558);
559
560extern_conformance!(
561 unsafe impl NSCoding for VNPixelBufferObservation {}
562);
563
564extern_conformance!(
565 unsafe impl NSCopying for VNPixelBufferObservation {}
566);
567
568unsafe impl CopyingHelper for VNPixelBufferObservation {
569 type Result = Self;
570}
571
572extern_conformance!(
573 unsafe impl NSObjectProtocol for VNPixelBufferObservation {}
574);
575
576extern_conformance!(
577 unsafe impl NSSecureCoding for VNPixelBufferObservation {}
578);
579
580#[cfg(feature = "VNRequestRevisionProviding")]
581extern_conformance!(
582 unsafe impl VNRequestRevisionProviding for VNPixelBufferObservation {}
583);
584
585impl VNPixelBufferObservation {
586 extern_methods!(
587 #[cfg(feature = "objc2-core-video")]
588 #[unsafe(method(pixelBuffer))]
590 #[unsafe(method_family = none)]
591 pub unsafe fn pixelBuffer(&self) -> Retained<CVPixelBuffer>;
592
593 #[unsafe(method(featureName))]
595 #[unsafe(method_family = none)]
596 pub unsafe fn featureName(&self) -> Option<Retained<NSString>>;
597 );
598}
599
600impl VNPixelBufferObservation {
602 extern_methods!(
603 #[unsafe(method(init))]
604 #[unsafe(method_family = init)]
605 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
606
607 #[unsafe(method(new))]
608 #[unsafe(method_family = new)]
609 pub unsafe fn new() -> Retained<Self>;
610 );
611}
612
613extern_class!(
614 #[unsafe(super(VNDetectedObjectObservation, VNObservation, NSObject))]
620 #[derive(Debug, PartialEq, Eq, Hash)]
621 pub struct VNRectangleObservation;
622);
623
624extern_conformance!(
625 unsafe impl NSCoding for VNRectangleObservation {}
626);
627
628extern_conformance!(
629 unsafe impl NSCopying for VNRectangleObservation {}
630);
631
632unsafe impl CopyingHelper for VNRectangleObservation {
633 type Result = Self;
634}
635
636extern_conformance!(
637 unsafe impl NSObjectProtocol for VNRectangleObservation {}
638);
639
640extern_conformance!(
641 unsafe impl NSSecureCoding for VNRectangleObservation {}
642);
643
644#[cfg(feature = "VNRequestRevisionProviding")]
645extern_conformance!(
646 unsafe impl VNRequestRevisionProviding for VNRectangleObservation {}
647);
648
649impl VNRectangleObservation {
650 extern_methods!(
651 #[cfg(feature = "objc2-core-foundation")]
652 #[deprecated]
667 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
668 #[unsafe(method_family = none)]
669 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
670 request_revision: NSUInteger,
671 top_left: CGPoint,
672 bottom_left: CGPoint,
673 bottom_right: CGPoint,
674 top_right: CGPoint,
675 ) -> Retained<Self>;
676
677 #[cfg(feature = "objc2-core-foundation")]
678 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
691 #[unsafe(method_family = none)]
692 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
693 request_revision: NSUInteger,
694 top_left: CGPoint,
695 top_right: CGPoint,
696 bottom_right: CGPoint,
697 bottom_left: CGPoint,
698 ) -> Retained<Self>;
699
700 #[cfg(feature = "objc2-core-foundation")]
701 #[unsafe(method(topLeft))]
702 #[unsafe(method_family = none)]
703 pub unsafe fn topLeft(&self) -> CGPoint;
704
705 #[cfg(feature = "objc2-core-foundation")]
706 #[unsafe(method(topRight))]
707 #[unsafe(method_family = none)]
708 pub unsafe fn topRight(&self) -> CGPoint;
709
710 #[cfg(feature = "objc2-core-foundation")]
711 #[unsafe(method(bottomLeft))]
712 #[unsafe(method_family = none)]
713 pub unsafe fn bottomLeft(&self) -> CGPoint;
714
715 #[cfg(feature = "objc2-core-foundation")]
716 #[unsafe(method(bottomRight))]
717 #[unsafe(method_family = none)]
718 pub unsafe fn bottomRight(&self) -> CGPoint;
719 );
720}
721
722impl VNRectangleObservation {
724 extern_methods!(
725 #[cfg(feature = "objc2-core-foundation")]
726 #[unsafe(method(observationWithBoundingBox:))]
728 #[unsafe(method_family = none)]
729 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
730
731 #[cfg(feature = "objc2-core-foundation")]
732 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
733 #[unsafe(method_family = none)]
734 pub unsafe fn observationWithRequestRevision_boundingBox(
735 request_revision: NSUInteger,
736 bounding_box: CGRect,
737 ) -> Retained<Self>;
738 );
739}
740
741impl VNRectangleObservation {
743 extern_methods!(
744 #[unsafe(method(init))]
745 #[unsafe(method_family = init)]
746 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
747
748 #[unsafe(method(new))]
749 #[unsafe(method_family = new)]
750 pub unsafe fn new() -> Retained<Self>;
751 );
752}
753
754extern_class!(
755 #[unsafe(super(VNObservation, NSObject))]
759 #[derive(Debug, PartialEq, Eq, Hash)]
760 pub struct VNTrajectoryObservation;
761);
762
763extern_conformance!(
764 unsafe impl NSCoding for VNTrajectoryObservation {}
765);
766
767extern_conformance!(
768 unsafe impl NSCopying for VNTrajectoryObservation {}
769);
770
771unsafe impl CopyingHelper for VNTrajectoryObservation {
772 type Result = Self;
773}
774
775extern_conformance!(
776 unsafe impl NSObjectProtocol for VNTrajectoryObservation {}
777);
778
779extern_conformance!(
780 unsafe impl NSSecureCoding for VNTrajectoryObservation {}
781);
782
783#[cfg(feature = "VNRequestRevisionProviding")]
784extern_conformance!(
785 unsafe impl VNRequestRevisionProviding for VNTrajectoryObservation {}
786);
787
788impl VNTrajectoryObservation {
789 extern_methods!(
790 #[cfg(feature = "VNGeometry")]
791 #[unsafe(method(detectedPoints))]
795 #[unsafe(method_family = none)]
796 pub unsafe fn detectedPoints(&self) -> Retained<NSArray<VNPoint>>;
797
798 #[cfg(feature = "VNGeometry")]
799 #[unsafe(method(projectedPoints))]
803 #[unsafe(method_family = none)]
804 pub unsafe fn projectedPoints(&self) -> Retained<NSArray<VNPoint>>;
805
806 #[cfg(feature = "objc2-core-foundation")]
807 #[unsafe(method(movingAverageRadius))]
811 #[unsafe(method_family = none)]
812 pub unsafe fn movingAverageRadius(&self) -> CGFloat;
813 );
814}
815
816impl VNTrajectoryObservation {
818 extern_methods!(
819 #[unsafe(method(init))]
820 #[unsafe(method_family = init)]
821 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
822
823 #[unsafe(method(new))]
824 #[unsafe(method_family = new)]
825 pub unsafe fn new() -> Retained<Self>;
826 );
827}
828
829extern_class!(
830 #[unsafe(super(
834 VNRectangleObservation,
835 VNDetectedObjectObservation,
836 VNObservation,
837 NSObject
838 ))]
839 #[derive(Debug, PartialEq, Eq, Hash)]
840 pub struct VNTextObservation;
841);
842
843extern_conformance!(
844 unsafe impl NSCoding for VNTextObservation {}
845);
846
847extern_conformance!(
848 unsafe impl NSCopying for VNTextObservation {}
849);
850
851unsafe impl CopyingHelper for VNTextObservation {
852 type Result = Self;
853}
854
855extern_conformance!(
856 unsafe impl NSObjectProtocol for VNTextObservation {}
857);
858
859extern_conformance!(
860 unsafe impl NSSecureCoding for VNTextObservation {}
861);
862
863#[cfg(feature = "VNRequestRevisionProviding")]
864extern_conformance!(
865 unsafe impl VNRequestRevisionProviding for VNTextObservation {}
866);
867
868impl VNTextObservation {
869 extern_methods!(
870 #[unsafe(method(characterBoxes))]
875 #[unsafe(method_family = none)]
876 pub unsafe fn characterBoxes(&self) -> Option<Retained<NSArray<VNRectangleObservation>>>;
877 );
878}
879
880impl VNTextObservation {
882 extern_methods!(
883 #[cfg(feature = "objc2-core-foundation")]
884 #[deprecated]
899 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
900 #[unsafe(method_family = none)]
901 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
902 request_revision: NSUInteger,
903 top_left: CGPoint,
904 bottom_left: CGPoint,
905 bottom_right: CGPoint,
906 top_right: CGPoint,
907 ) -> Retained<Self>;
908
909 #[cfg(feature = "objc2-core-foundation")]
910 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
923 #[unsafe(method_family = none)]
924 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
925 request_revision: NSUInteger,
926 top_left: CGPoint,
927 top_right: CGPoint,
928 bottom_right: CGPoint,
929 bottom_left: CGPoint,
930 ) -> Retained<Self>;
931 );
932}
933
934impl VNTextObservation {
936 extern_methods!(
937 #[cfg(feature = "objc2-core-foundation")]
938 #[unsafe(method(observationWithBoundingBox:))]
940 #[unsafe(method_family = none)]
941 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
942
943 #[cfg(feature = "objc2-core-foundation")]
944 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
945 #[unsafe(method_family = none)]
946 pub unsafe fn observationWithRequestRevision_boundingBox(
947 request_revision: NSUInteger,
948 bounding_box: CGRect,
949 ) -> Retained<Self>;
950 );
951}
952
953impl VNTextObservation {
955 extern_methods!(
956 #[unsafe(method(init))]
957 #[unsafe(method_family = init)]
958 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
959
960 #[unsafe(method(new))]
961 #[unsafe(method_family = new)]
962 pub unsafe fn new() -> Retained<Self>;
963 );
964}
965
966extern_class!(
967 #[unsafe(super(NSObject))]
971 #[derive(Debug, PartialEq, Eq, Hash)]
972 pub struct VNRecognizedText;
973);
974
975extern_conformance!(
976 unsafe impl NSCoding for VNRecognizedText {}
977);
978
979extern_conformance!(
980 unsafe impl NSCopying for VNRecognizedText {}
981);
982
983unsafe impl CopyingHelper for VNRecognizedText {
984 type Result = Self;
985}
986
987extern_conformance!(
988 unsafe impl NSObjectProtocol for VNRecognizedText {}
989);
990
991extern_conformance!(
992 unsafe impl NSSecureCoding for VNRecognizedText {}
993);
994
995#[cfg(feature = "VNRequestRevisionProviding")]
996extern_conformance!(
997 unsafe impl VNRequestRevisionProviding for VNRecognizedText {}
998);
999
1000impl VNRecognizedText {
1001 extern_methods!(
1002 #[unsafe(method(string))]
1006 #[unsafe(method_family = none)]
1007 pub fn string(&self) -> Retained<NSString>;
1008
1009 #[cfg(feature = "VNTypes")]
1010 #[unsafe(method(confidence))]
1012 #[unsafe(method_family = none)]
1013 pub fn confidence(&self) -> VNConfidence;
1014 );
1015}
1016
1017impl VNRecognizedText {
1019 extern_methods!(
1020 #[unsafe(method(init))]
1021 #[unsafe(method_family = init)]
1022 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1023
1024 #[unsafe(method(new))]
1025 #[unsafe(method_family = new)]
1026 pub unsafe fn new() -> Retained<Self>;
1027 );
1028}
1029
1030extern_class!(
1031 #[unsafe(super(
1035 VNRectangleObservation,
1036 VNDetectedObjectObservation,
1037 VNObservation,
1038 NSObject
1039 ))]
1040 #[derive(Debug, PartialEq, Eq, Hash)]
1041 pub struct VNRecognizedTextObservation;
1042);
1043
1044extern_conformance!(
1045 unsafe impl NSCoding for VNRecognizedTextObservation {}
1046);
1047
1048extern_conformance!(
1049 unsafe impl NSCopying for VNRecognizedTextObservation {}
1050);
1051
1052unsafe impl CopyingHelper for VNRecognizedTextObservation {
1053 type Result = Self;
1054}
1055
1056extern_conformance!(
1057 unsafe impl NSObjectProtocol for VNRecognizedTextObservation {}
1058);
1059
1060extern_conformance!(
1061 unsafe impl NSSecureCoding for VNRecognizedTextObservation {}
1062);
1063
1064#[cfg(feature = "VNRequestRevisionProviding")]
1065extern_conformance!(
1066 unsafe impl VNRequestRevisionProviding for VNRecognizedTextObservation {}
1067);
1068
1069impl VNRecognizedTextObservation {
1070 extern_methods!(
1071 #[unsafe(method(topCandidates:))]
1075 #[unsafe(method_family = none)]
1076 pub fn topCandidates(
1077 &self,
1078 max_candidate_count: NSUInteger,
1079 ) -> Retained<NSArray<VNRecognizedText>>;
1080 );
1081}
1082
1083impl VNRecognizedTextObservation {
1085 extern_methods!(
1086 #[cfg(feature = "objc2-core-foundation")]
1087 #[deprecated]
1102 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
1103 #[unsafe(method_family = none)]
1104 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
1105 request_revision: NSUInteger,
1106 top_left: CGPoint,
1107 bottom_left: CGPoint,
1108 bottom_right: CGPoint,
1109 top_right: CGPoint,
1110 ) -> Retained<Self>;
1111
1112 #[cfg(feature = "objc2-core-foundation")]
1113 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
1126 #[unsafe(method_family = none)]
1127 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
1128 request_revision: NSUInteger,
1129 top_left: CGPoint,
1130 top_right: CGPoint,
1131 bottom_right: CGPoint,
1132 bottom_left: CGPoint,
1133 ) -> Retained<Self>;
1134 );
1135}
1136
1137impl VNRecognizedTextObservation {
1139 extern_methods!(
1140 #[cfg(feature = "objc2-core-foundation")]
1141 #[unsafe(method(observationWithBoundingBox:))]
1143 #[unsafe(method_family = none)]
1144 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
1145
1146 #[cfg(feature = "objc2-core-foundation")]
1147 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
1148 #[unsafe(method_family = none)]
1149 pub unsafe fn observationWithRequestRevision_boundingBox(
1150 request_revision: NSUInteger,
1151 bounding_box: CGRect,
1152 ) -> Retained<Self>;
1153 );
1154}
1155
1156impl VNRecognizedTextObservation {
1158 extern_methods!(
1159 #[unsafe(method(init))]
1160 #[unsafe(method_family = init)]
1161 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1162
1163 #[unsafe(method(new))]
1164 #[unsafe(method_family = new)]
1165 pub unsafe fn new() -> Retained<Self>;
1166 );
1167}
1168
1169extern_class!(
1170 #[unsafe(super(
1174 VNRectangleObservation,
1175 VNDetectedObjectObservation,
1176 VNObservation,
1177 NSObject
1178 ))]
1179 #[derive(Debug, PartialEq, Eq, Hash)]
1180 pub struct VNBarcodeObservation;
1181);
1182
1183extern_conformance!(
1184 unsafe impl NSCoding for VNBarcodeObservation {}
1185);
1186
1187extern_conformance!(
1188 unsafe impl NSCopying for VNBarcodeObservation {}
1189);
1190
1191unsafe impl CopyingHelper for VNBarcodeObservation {
1192 type Result = Self;
1193}
1194
1195extern_conformance!(
1196 unsafe impl NSObjectProtocol for VNBarcodeObservation {}
1197);
1198
1199extern_conformance!(
1200 unsafe impl NSSecureCoding for VNBarcodeObservation {}
1201);
1202
1203#[cfg(feature = "VNRequestRevisionProviding")]
1204extern_conformance!(
1205 unsafe impl VNRequestRevisionProviding for VNBarcodeObservation {}
1206);
1207
1208impl VNBarcodeObservation {
1209 extern_methods!(
1210 #[cfg(feature = "VNTypes")]
1211 #[unsafe(method(symbology))]
1213 #[unsafe(method_family = none)]
1214 pub unsafe fn symbology(&self) -> Retained<VNBarcodeSymbology>;
1215
1216 #[cfg(feature = "objc2-core-image")]
1217 #[unsafe(method(barcodeDescriptor))]
1219 #[unsafe(method_family = none)]
1220 pub unsafe fn barcodeDescriptor(&self) -> Option<Retained<CIBarcodeDescriptor>>;
1221
1222 #[unsafe(method(payloadStringValue))]
1224 #[unsafe(method_family = none)]
1225 pub unsafe fn payloadStringValue(&self) -> Option<Retained<NSString>>;
1226
1227 #[unsafe(method(payloadData))]
1229 #[unsafe(method_family = none)]
1230 pub unsafe fn payloadData(&self) -> Option<Retained<NSData>>;
1231
1232 #[unsafe(method(isGS1DataCarrier))]
1234 #[unsafe(method_family = none)]
1235 pub unsafe fn isGS1DataCarrier(&self) -> bool;
1236
1237 #[unsafe(method(isColorInverted))]
1239 #[unsafe(method_family = none)]
1240 pub unsafe fn isColorInverted(&self) -> bool;
1241
1242 #[cfg(feature = "VNTypes")]
1243 #[unsafe(method(supplementalCompositeType))]
1246 #[unsafe(method_family = none)]
1247 pub unsafe fn supplementalCompositeType(&self) -> VNBarcodeCompositeType;
1248
1249 #[unsafe(method(supplementalPayloadString))]
1252 #[unsafe(method_family = none)]
1253 pub unsafe fn supplementalPayloadString(&self) -> Option<Retained<NSString>>;
1254
1255 #[unsafe(method(supplementalPayloadData))]
1258 #[unsafe(method_family = none)]
1259 pub unsafe fn supplementalPayloadData(&self) -> Option<Retained<NSData>>;
1260 );
1261}
1262
1263impl VNBarcodeObservation {
1265 extern_methods!(
1266 #[cfg(feature = "objc2-core-foundation")]
1267 #[deprecated]
1282 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
1283 #[unsafe(method_family = none)]
1284 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
1285 request_revision: NSUInteger,
1286 top_left: CGPoint,
1287 bottom_left: CGPoint,
1288 bottom_right: CGPoint,
1289 top_right: CGPoint,
1290 ) -> Retained<Self>;
1291
1292 #[cfg(feature = "objc2-core-foundation")]
1293 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
1306 #[unsafe(method_family = none)]
1307 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
1308 request_revision: NSUInteger,
1309 top_left: CGPoint,
1310 top_right: CGPoint,
1311 bottom_right: CGPoint,
1312 bottom_left: CGPoint,
1313 ) -> Retained<Self>;
1314 );
1315}
1316
1317impl VNBarcodeObservation {
1319 extern_methods!(
1320 #[cfg(feature = "objc2-core-foundation")]
1321 #[unsafe(method(observationWithBoundingBox:))]
1323 #[unsafe(method_family = none)]
1324 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
1325
1326 #[cfg(feature = "objc2-core-foundation")]
1327 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
1328 #[unsafe(method_family = none)]
1329 pub unsafe fn observationWithRequestRevision_boundingBox(
1330 request_revision: NSUInteger,
1331 bounding_box: CGRect,
1332 ) -> Retained<Self>;
1333 );
1334}
1335
1336impl VNBarcodeObservation {
1338 extern_methods!(
1339 #[unsafe(method(init))]
1340 #[unsafe(method_family = init)]
1341 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1342
1343 #[unsafe(method(new))]
1344 #[unsafe(method_family = new)]
1345 pub unsafe fn new() -> Retained<Self>;
1346 );
1347}
1348
1349extern_class!(
1350 #[unsafe(super(VNObservation, NSObject))]
1356 #[derive(Debug, PartialEq, Eq, Hash)]
1357 pub struct VNHorizonObservation;
1358);
1359
1360extern_conformance!(
1361 unsafe impl NSCoding for VNHorizonObservation {}
1362);
1363
1364extern_conformance!(
1365 unsafe impl NSCopying for VNHorizonObservation {}
1366);
1367
1368unsafe impl CopyingHelper for VNHorizonObservation {
1369 type Result = Self;
1370}
1371
1372extern_conformance!(
1373 unsafe impl NSObjectProtocol for VNHorizonObservation {}
1374);
1375
1376extern_conformance!(
1377 unsafe impl NSSecureCoding for VNHorizonObservation {}
1378);
1379
1380#[cfg(feature = "VNRequestRevisionProviding")]
1381extern_conformance!(
1382 unsafe impl VNRequestRevisionProviding for VNHorizonObservation {}
1383);
1384
1385impl VNHorizonObservation {
1386 extern_methods!(
1387 #[cfg(feature = "objc2-core-foundation")]
1388 #[unsafe(method(transform))]
1392 #[unsafe(method_family = none)]
1393 pub unsafe fn transform(&self) -> CGAffineTransform;
1394
1395 #[cfg(feature = "objc2-core-foundation")]
1396 #[unsafe(method(angle))]
1398 #[unsafe(method_family = none)]
1399 pub unsafe fn angle(&self) -> CGFloat;
1400
1401 #[cfg(feature = "objc2-core-foundation")]
1402 #[unsafe(method(transformForImageWidth:height:))]
1404 #[unsafe(method_family = none)]
1405 pub unsafe fn transformForImageWidth_height(
1406 &self,
1407 width: usize,
1408 height: usize,
1409 ) -> CGAffineTransform;
1410 );
1411}
1412
1413impl VNHorizonObservation {
1415 extern_methods!(
1416 #[unsafe(method(init))]
1417 #[unsafe(method_family = init)]
1418 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1419
1420 #[unsafe(method(new))]
1421 #[unsafe(method_family = new)]
1422 pub unsafe fn new() -> Retained<Self>;
1423 );
1424}
1425
1426extern_class!(
1427 #[unsafe(super(VNObservation, NSObject))]
1431 #[derive(Debug, PartialEq, Eq, Hash)]
1432 pub struct VNImageAlignmentObservation;
1433);
1434
1435extern_conformance!(
1436 unsafe impl NSCoding for VNImageAlignmentObservation {}
1437);
1438
1439extern_conformance!(
1440 unsafe impl NSCopying for VNImageAlignmentObservation {}
1441);
1442
1443unsafe impl CopyingHelper for VNImageAlignmentObservation {
1444 type Result = Self;
1445}
1446
1447extern_conformance!(
1448 unsafe impl NSObjectProtocol for VNImageAlignmentObservation {}
1449);
1450
1451extern_conformance!(
1452 unsafe impl NSSecureCoding for VNImageAlignmentObservation {}
1453);
1454
1455#[cfg(feature = "VNRequestRevisionProviding")]
1456extern_conformance!(
1457 unsafe impl VNRequestRevisionProviding for VNImageAlignmentObservation {}
1458);
1459
1460impl VNImageAlignmentObservation {
1461 extern_methods!();
1462}
1463
1464impl VNImageAlignmentObservation {
1466 extern_methods!(
1467 #[unsafe(method(init))]
1468 #[unsafe(method_family = init)]
1469 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1470
1471 #[unsafe(method(new))]
1472 #[unsafe(method_family = new)]
1473 pub unsafe fn new() -> Retained<Self>;
1474 );
1475}
1476
1477extern_class!(
1478 #[unsafe(super(VNImageAlignmentObservation, VNObservation, NSObject))]
1482 #[derive(Debug, PartialEq, Eq, Hash)]
1483 pub struct VNImageTranslationAlignmentObservation;
1484);
1485
1486extern_conformance!(
1487 unsafe impl NSCoding for VNImageTranslationAlignmentObservation {}
1488);
1489
1490extern_conformance!(
1491 unsafe impl NSCopying for VNImageTranslationAlignmentObservation {}
1492);
1493
1494unsafe impl CopyingHelper for VNImageTranslationAlignmentObservation {
1495 type Result = Self;
1496}
1497
1498extern_conformance!(
1499 unsafe impl NSObjectProtocol for VNImageTranslationAlignmentObservation {}
1500);
1501
1502extern_conformance!(
1503 unsafe impl NSSecureCoding for VNImageTranslationAlignmentObservation {}
1504);
1505
1506#[cfg(feature = "VNRequestRevisionProviding")]
1507extern_conformance!(
1508 unsafe impl VNRequestRevisionProviding for VNImageTranslationAlignmentObservation {}
1509);
1510
1511impl VNImageTranslationAlignmentObservation {
1512 extern_methods!(
1513 #[cfg(feature = "objc2-core-foundation")]
1514 #[unsafe(method(alignmentTransform))]
1515 #[unsafe(method_family = none)]
1516 pub unsafe fn alignmentTransform(&self) -> CGAffineTransform;
1517 );
1518}
1519
1520impl VNImageTranslationAlignmentObservation {
1522 extern_methods!(
1523 #[unsafe(method(init))]
1524 #[unsafe(method_family = init)]
1525 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1526
1527 #[unsafe(method(new))]
1528 #[unsafe(method_family = new)]
1529 pub unsafe fn new() -> Retained<Self>;
1530 );
1531}
1532
1533extern_class!(
1534 #[unsafe(super(VNImageAlignmentObservation, VNObservation, NSObject))]
1538 #[derive(Debug, PartialEq, Eq, Hash)]
1539 pub struct VNImageHomographicAlignmentObservation;
1540);
1541
1542extern_conformance!(
1543 unsafe impl NSCoding for VNImageHomographicAlignmentObservation {}
1544);
1545
1546extern_conformance!(
1547 unsafe impl NSCopying for VNImageHomographicAlignmentObservation {}
1548);
1549
1550unsafe impl CopyingHelper for VNImageHomographicAlignmentObservation {
1551 type Result = Self;
1552}
1553
1554extern_conformance!(
1555 unsafe impl NSObjectProtocol for VNImageHomographicAlignmentObservation {}
1556);
1557
1558extern_conformance!(
1559 unsafe impl NSSecureCoding for VNImageHomographicAlignmentObservation {}
1560);
1561
1562#[cfg(feature = "VNRequestRevisionProviding")]
1563extern_conformance!(
1564 unsafe impl VNRequestRevisionProviding for VNImageHomographicAlignmentObservation {}
1565);
1566
1567impl VNImageHomographicAlignmentObservation {
1568 extern_methods!();
1569}
1570
1571impl VNImageHomographicAlignmentObservation {
1573 extern_methods!(
1574 #[unsafe(method(init))]
1575 #[unsafe(method_family = init)]
1576 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1577
1578 #[unsafe(method(new))]
1579 #[unsafe(method_family = new)]
1580 pub unsafe fn new() -> Retained<Self>;
1581 );
1582}
1583
1584extern_class!(
1585 #[unsafe(super(VNPixelBufferObservation, VNObservation, NSObject))]
1591 #[derive(Debug, PartialEq, Eq, Hash)]
1592 pub struct VNSaliencyImageObservation;
1593);
1594
1595extern_conformance!(
1596 unsafe impl NSCoding for VNSaliencyImageObservation {}
1597);
1598
1599extern_conformance!(
1600 unsafe impl NSCopying for VNSaliencyImageObservation {}
1601);
1602
1603unsafe impl CopyingHelper for VNSaliencyImageObservation {
1604 type Result = Self;
1605}
1606
1607extern_conformance!(
1608 unsafe impl NSObjectProtocol for VNSaliencyImageObservation {}
1609);
1610
1611extern_conformance!(
1612 unsafe impl NSSecureCoding for VNSaliencyImageObservation {}
1613);
1614
1615#[cfg(feature = "VNRequestRevisionProviding")]
1616extern_conformance!(
1617 unsafe impl VNRequestRevisionProviding for VNSaliencyImageObservation {}
1618);
1619
1620impl VNSaliencyImageObservation {
1621 extern_methods!(
1622 #[unsafe(method(salientObjects))]
1624 #[unsafe(method_family = none)]
1625 pub unsafe fn salientObjects(&self) -> Option<Retained<NSArray<VNRectangleObservation>>>;
1626 );
1627}
1628
1629impl VNSaliencyImageObservation {
1631 extern_methods!(
1632 #[unsafe(method(init))]
1633 #[unsafe(method_family = init)]
1634 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1635
1636 #[unsafe(method(new))]
1637 #[unsafe(method_family = new)]
1638 pub unsafe fn new() -> Retained<Self>;
1639 );
1640}
1641
1642extern_class!(
1643 #[unsafe(super(VNObservation, NSObject))]
1645 #[derive(Debug, PartialEq, Eq, Hash)]
1646 pub struct VNFeaturePrintObservation;
1647);
1648
1649extern_conformance!(
1650 unsafe impl NSCoding for VNFeaturePrintObservation {}
1651);
1652
1653extern_conformance!(
1654 unsafe impl NSCopying for VNFeaturePrintObservation {}
1655);
1656
1657unsafe impl CopyingHelper for VNFeaturePrintObservation {
1658 type Result = Self;
1659}
1660
1661extern_conformance!(
1662 unsafe impl NSObjectProtocol for VNFeaturePrintObservation {}
1663);
1664
1665extern_conformance!(
1666 unsafe impl NSSecureCoding for VNFeaturePrintObservation {}
1667);
1668
1669#[cfg(feature = "VNRequestRevisionProviding")]
1670extern_conformance!(
1671 unsafe impl VNRequestRevisionProviding for VNFeaturePrintObservation {}
1672);
1673
1674impl VNFeaturePrintObservation {
1675 extern_methods!(
1676 #[cfg(feature = "VNTypes")]
1677 #[unsafe(method(elementType))]
1679 #[unsafe(method_family = none)]
1680 pub unsafe fn elementType(&self) -> VNElementType;
1681
1682 #[unsafe(method(elementCount))]
1684 #[unsafe(method_family = none)]
1685 pub unsafe fn elementCount(&self) -> NSUInteger;
1686
1687 #[unsafe(method(data))]
1689 #[unsafe(method_family = none)]
1690 pub unsafe fn data(&self) -> Retained<NSData>;
1691
1692 #[unsafe(method(computeDistance:toFeaturePrintObservation:error:_))]
1700 #[unsafe(method_family = none)]
1701 pub unsafe fn computeDistance_toFeaturePrintObservation_error(
1702 &self,
1703 out_distance: NonNull<c_float>,
1704 feature_print: &VNFeaturePrintObservation,
1705 ) -> Result<(), Retained<NSError>>;
1706 );
1707}
1708
1709impl VNFeaturePrintObservation {
1711 extern_methods!(
1712 #[unsafe(method(init))]
1713 #[unsafe(method_family = init)]
1714 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1715
1716 #[unsafe(method(new))]
1717 #[unsafe(method_family = new)]
1718 pub unsafe fn new() -> Retained<Self>;
1719 );
1720}
1721
1722extern_class!(
1723 #[unsafe(super(VNObservation, NSObject))]
1725 #[derive(Debug, PartialEq, Eq, Hash)]
1726 pub struct VNContoursObservation;
1727);
1728
1729extern_conformance!(
1730 unsafe impl NSCoding for VNContoursObservation {}
1731);
1732
1733extern_conformance!(
1734 unsafe impl NSCopying for VNContoursObservation {}
1735);
1736
1737unsafe impl CopyingHelper for VNContoursObservation {
1738 type Result = Self;
1739}
1740
1741extern_conformance!(
1742 unsafe impl NSObjectProtocol for VNContoursObservation {}
1743);
1744
1745extern_conformance!(
1746 unsafe impl NSSecureCoding for VNContoursObservation {}
1747);
1748
1749#[cfg(feature = "VNRequestRevisionProviding")]
1750extern_conformance!(
1751 unsafe impl VNRequestRevisionProviding for VNContoursObservation {}
1752);
1753
1754impl VNContoursObservation {
1755 extern_methods!(
1756 #[unsafe(method(contourCount))]
1758 #[unsafe(method_family = none)]
1759 pub unsafe fn contourCount(&self) -> NSInteger;
1760
1761 #[cfg(feature = "VNGeometry")]
1762 #[unsafe(method(contourAtIndex:error:_))]
1770 #[unsafe(method_family = none)]
1771 pub unsafe fn contourAtIndex_error(
1772 &self,
1773 contour_index: NSInteger,
1774 ) -> Result<Retained<VNContour>, Retained<NSError>>;
1775
1776 #[unsafe(method(topLevelContourCount))]
1778 #[unsafe(method_family = none)]
1779 pub unsafe fn topLevelContourCount(&self) -> NSInteger;
1780
1781 #[cfg(feature = "VNGeometry")]
1782 #[unsafe(method(topLevelContours))]
1788 #[unsafe(method_family = none)]
1789 pub unsafe fn topLevelContours(&self) -> Retained<NSArray<VNContour>>;
1790
1791 #[cfg(feature = "VNGeometry")]
1792 #[unsafe(method(contourAtIndexPath:error:_))]
1802 #[unsafe(method_family = none)]
1803 pub unsafe fn contourAtIndexPath_error(
1804 &self,
1805 index_path: &NSIndexPath,
1806 ) -> Result<Retained<VNContour>, Retained<NSError>>;
1807
1808 #[cfg(feature = "objc2-core-graphics")]
1809 #[unsafe(method(normalizedPath))]
1813 #[unsafe(method_family = none)]
1814 pub unsafe fn normalizedPath(&self) -> Retained<CGPath>;
1815 );
1816}
1817
1818impl VNContoursObservation {
1820 extern_methods!(
1821 #[unsafe(method(init))]
1822 #[unsafe(method_family = init)]
1823 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1824
1825 #[unsafe(method(new))]
1826 #[unsafe(method_family = new)]
1827 pub unsafe fn new() -> Retained<Self>;
1828 );
1829}
1830
1831extern "C" {
1832 #[cfg(feature = "VNTypes")]
1834 pub static VNRecognizedPointGroupKeyAll: &'static VNRecognizedPointGroupKey;
1835}
1836
1837extern_class!(
1838 #[unsafe(super(VNObservation, NSObject))]
1842 #[derive(Debug, PartialEq, Eq, Hash)]
1843 pub struct VNRecognizedPointsObservation;
1844);
1845
1846extern_conformance!(
1847 unsafe impl NSCoding for VNRecognizedPointsObservation {}
1848);
1849
1850extern_conformance!(
1851 unsafe impl NSCopying for VNRecognizedPointsObservation {}
1852);
1853
1854unsafe impl CopyingHelper for VNRecognizedPointsObservation {
1855 type Result = Self;
1856}
1857
1858extern_conformance!(
1859 unsafe impl NSObjectProtocol for VNRecognizedPointsObservation {}
1860);
1861
1862extern_conformance!(
1863 unsafe impl NSSecureCoding for VNRecognizedPointsObservation {}
1864);
1865
1866#[cfg(feature = "VNRequestRevisionProviding")]
1867extern_conformance!(
1868 unsafe impl VNRequestRevisionProviding for VNRecognizedPointsObservation {}
1869);
1870
1871impl VNRecognizedPointsObservation {
1872 extern_methods!(
1873 #[unsafe(method(new))]
1874 #[unsafe(method_family = new)]
1875 pub unsafe fn new() -> Retained<Self>;
1876
1877 #[unsafe(method(init))]
1878 #[unsafe(method_family = init)]
1879 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1880
1881 #[cfg(feature = "VNTypes")]
1882 #[unsafe(method(availableKeys))]
1884 #[unsafe(method_family = none)]
1885 pub unsafe fn availableKeys(&self) -> Retained<NSArray<VNRecognizedPointKey>>;
1886
1887 #[cfg(feature = "VNTypes")]
1888 #[unsafe(method(availableGroupKeys))]
1890 #[unsafe(method_family = none)]
1891 pub unsafe fn availableGroupKeys(&self) -> Retained<NSArray<VNRecognizedPointGroupKey>>;
1892
1893 #[cfg(all(
1894 feature = "VNDetectedPoint",
1895 feature = "VNGeometry",
1896 feature = "VNTypes"
1897 ))]
1898 #[unsafe(method(recognizedPointForKey:error:_))]
1909 #[unsafe(method_family = none)]
1910 pub unsafe fn recognizedPointForKey_error(
1911 &self,
1912 point_key: &VNRecognizedPointKey,
1913 ) -> Result<Retained<VNRecognizedPoint>, Retained<NSError>>;
1914
1915 #[cfg(all(
1916 feature = "VNDetectedPoint",
1917 feature = "VNGeometry",
1918 feature = "VNTypes"
1919 ))]
1920 #[unsafe(method(recognizedPointsForGroupKey:error:_))]
1932 #[unsafe(method_family = none)]
1933 pub unsafe fn recognizedPointsForGroupKey_error(
1934 &self,
1935 group_key: &VNRecognizedPointGroupKey,
1936 ) -> Result<
1937 Retained<NSDictionary<VNRecognizedPointKey, VNRecognizedPoint>>,
1938 Retained<NSError>,
1939 >;
1940
1941 #[cfg(feature = "objc2-core-ml")]
1942 #[unsafe(method(keypointsMultiArrayAndReturnError:_))]
1954 #[unsafe(method_family = none)]
1955 pub unsafe fn keypointsMultiArrayAndReturnError(
1956 &self,
1957 ) -> Result<Retained<MLMultiArray>, Retained<NSError>>;
1958 );
1959}
1960
1961extern_class!(
1962 #[unsafe(super(VNDetectedObjectObservation, VNObservation, NSObject))]
1966 #[derive(Debug, PartialEq, Eq, Hash)]
1967 pub struct VNHumanObservation;
1968);
1969
1970extern_conformance!(
1971 unsafe impl NSCoding for VNHumanObservation {}
1972);
1973
1974extern_conformance!(
1975 unsafe impl NSCopying for VNHumanObservation {}
1976);
1977
1978unsafe impl CopyingHelper for VNHumanObservation {
1979 type Result = Self;
1980}
1981
1982extern_conformance!(
1983 unsafe impl NSObjectProtocol for VNHumanObservation {}
1984);
1985
1986extern_conformance!(
1987 unsafe impl NSSecureCoding for VNHumanObservation {}
1988);
1989
1990#[cfg(feature = "VNRequestRevisionProviding")]
1991extern_conformance!(
1992 unsafe impl VNRequestRevisionProviding for VNHumanObservation {}
1993);
1994
1995impl VNHumanObservation {
1996 extern_methods!(
1997 #[unsafe(method(upperBodyOnly))]
1999 #[unsafe(method_family = none)]
2000 pub unsafe fn upperBodyOnly(&self) -> bool;
2001 );
2002}
2003
2004impl VNHumanObservation {
2006 extern_methods!(
2007 #[cfg(feature = "objc2-core-foundation")]
2008 #[unsafe(method(observationWithBoundingBox:))]
2010 #[unsafe(method_family = none)]
2011 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
2012
2013 #[cfg(feature = "objc2-core-foundation")]
2014 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
2015 #[unsafe(method_family = none)]
2016 pub unsafe fn observationWithRequestRevision_boundingBox(
2017 request_revision: NSUInteger,
2018 bounding_box: CGRect,
2019 ) -> Retained<Self>;
2020 );
2021}
2022
2023impl VNHumanObservation {
2025 extern_methods!(
2026 #[unsafe(method(init))]
2027 #[unsafe(method_family = init)]
2028 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2029
2030 #[unsafe(method(new))]
2031 #[unsafe(method_family = new)]
2032 pub unsafe fn new() -> Retained<Self>;
2033 );
2034}
2035
2036extern_class!(
2037 #[unsafe(super(VNObservation, NSObject))]
2041 #[derive(Debug, PartialEq, Eq, Hash)]
2042 pub struct VNInstanceMaskObservation;
2043);
2044
2045extern_conformance!(
2046 unsafe impl NSCoding for VNInstanceMaskObservation {}
2047);
2048
2049extern_conformance!(
2050 unsafe impl NSCopying for VNInstanceMaskObservation {}
2051);
2052
2053unsafe impl CopyingHelper for VNInstanceMaskObservation {
2054 type Result = Self;
2055}
2056
2057extern_conformance!(
2058 unsafe impl NSObjectProtocol for VNInstanceMaskObservation {}
2059);
2060
2061extern_conformance!(
2062 unsafe impl NSSecureCoding for VNInstanceMaskObservation {}
2063);
2064
2065#[cfg(feature = "VNRequestRevisionProviding")]
2066extern_conformance!(
2067 unsafe impl VNRequestRevisionProviding for VNInstanceMaskObservation {}
2068);
2069
2070impl VNInstanceMaskObservation {
2071 extern_methods!(
2072 #[cfg(feature = "objc2-core-video")]
2073 #[unsafe(method(instanceMask))]
2076 #[unsafe(method_family = none)]
2077 pub unsafe fn instanceMask(&self) -> Retained<CVPixelBuffer>;
2078
2079 #[unsafe(method(allInstances))]
2081 #[unsafe(method_family = none)]
2082 pub unsafe fn allInstances(&self) -> Retained<NSIndexSet>;
2083
2084 #[cfg(feature = "objc2-core-video")]
2085 #[unsafe(method(generateMaskForInstances:error:_))]
2092 #[unsafe(method_family = copy)]
2094 pub unsafe fn generateMaskForInstances_error(
2095 &self,
2096 instances: &NSIndexSet,
2097 ) -> Result<Retained<CVPixelBuffer>, Retained<NSError>>;
2098
2099 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
2100 #[unsafe(method(generateMaskedImageOfInstances:fromRequestHandler:croppedToInstancesExtent:error:_))]
2109 #[unsafe(method_family = copy)]
2111 pub unsafe fn generateMaskedImageOfInstances_fromRequestHandler_croppedToInstancesExtent_error(
2112 &self,
2113 instances: &NSIndexSet,
2114 request_handler: &VNImageRequestHandler,
2115 crop_result: bool,
2116 ) -> Result<Retained<CVPixelBuffer>, Retained<NSError>>;
2117
2118 #[cfg(all(feature = "VNRequestHandler", feature = "objc2-core-video"))]
2119 #[unsafe(method(generateScaledMaskForImageForInstances:fromRequestHandler:error:_))]
2125 #[unsafe(method_family = copy)]
2127 pub unsafe fn generateScaledMaskForImageForInstances_fromRequestHandler_error(
2128 &self,
2129 instances: &NSIndexSet,
2130 request_handler: &VNImageRequestHandler,
2131 ) -> Result<Retained<CVPixelBuffer>, Retained<NSError>>;
2132 );
2133}
2134
2135impl VNInstanceMaskObservation {
2137 extern_methods!(
2138 #[unsafe(method(init))]
2139 #[unsafe(method_family = init)]
2140 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2141
2142 #[unsafe(method(new))]
2143 #[unsafe(method_family = new)]
2144 pub unsafe fn new() -> Retained<Self>;
2145 );
2146}
2147
2148extern_class!(
2149 #[unsafe(super(VNRecognizedPointsObservation, VNObservation, NSObject))]
2151 #[derive(Debug, PartialEq, Eq, Hash)]
2152 pub struct VNAnimalBodyPoseObservation;
2153);
2154
2155extern_conformance!(
2156 unsafe impl NSCoding for VNAnimalBodyPoseObservation {}
2157);
2158
2159extern_conformance!(
2160 unsafe impl NSCopying for VNAnimalBodyPoseObservation {}
2161);
2162
2163unsafe impl CopyingHelper for VNAnimalBodyPoseObservation {
2164 type Result = Self;
2165}
2166
2167extern_conformance!(
2168 unsafe impl NSObjectProtocol for VNAnimalBodyPoseObservation {}
2169);
2170
2171extern_conformance!(
2172 unsafe impl NSSecureCoding for VNAnimalBodyPoseObservation {}
2173);
2174
2175#[cfg(feature = "VNRequestRevisionProviding")]
2176extern_conformance!(
2177 unsafe impl VNRequestRevisionProviding for VNAnimalBodyPoseObservation {}
2178);
2179
2180impl VNAnimalBodyPoseObservation {
2181 extern_methods!(
2182 #[cfg(feature = "VNTypes")]
2183 #[unsafe(method(availableJointNames))]
2185 #[unsafe(method_family = none)]
2186 pub unsafe fn availableJointNames(
2187 &self,
2188 ) -> Retained<NSArray<VNAnimalBodyPoseObservationJointName>>;
2189
2190 #[cfg(feature = "VNTypes")]
2191 #[unsafe(method(availableJointGroupNames))]
2193 #[unsafe(method_family = none)]
2194 pub unsafe fn availableJointGroupNames(
2195 &self,
2196 ) -> Retained<NSArray<VNAnimalBodyPoseObservationJointsGroupName>>;
2197
2198 #[cfg(all(
2199 feature = "VNDetectedPoint",
2200 feature = "VNGeometry",
2201 feature = "VNTypes"
2202 ))]
2203 #[unsafe(method(recognizedPointForJointName:error:_))]
2212 #[unsafe(method_family = none)]
2213 pub unsafe fn recognizedPointForJointName_error(
2214 &self,
2215 joint_name: &VNAnimalBodyPoseObservationJointName,
2216 ) -> Result<Retained<VNRecognizedPoint>, Retained<NSError>>;
2217
2218 #[cfg(all(
2219 feature = "VNDetectedPoint",
2220 feature = "VNGeometry",
2221 feature = "VNTypes"
2222 ))]
2223 #[unsafe(method(recognizedPointsForJointsGroupName:error:_))]
2235 #[unsafe(method_family = none)]
2236 pub unsafe fn recognizedPointsForJointsGroupName_error(
2237 &self,
2238 joints_group_name: &VNAnimalBodyPoseObservationJointsGroupName,
2239 ) -> Result<
2240 Retained<NSDictionary<VNAnimalBodyPoseObservationJointName, VNRecognizedPoint>>,
2241 Retained<NSError>,
2242 >;
2243 );
2244}
2245
2246impl VNAnimalBodyPoseObservation {
2248 extern_methods!(
2249 #[unsafe(method(new))]
2250 #[unsafe(method_family = new)]
2251 pub unsafe fn new() -> Retained<Self>;
2252
2253 #[unsafe(method(init))]
2254 #[unsafe(method_family = init)]
2255 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2256 );
2257}
2258
2259extern "C" {
2260 #[cfg(feature = "VNTypes")]
2262 pub static VNRecognizedPoint3DGroupKeyAll: &'static VNRecognizedPointGroupKey;
2263}
2264
2265extern_class!(
2266 #[unsafe(super(VNObservation, NSObject))]
2272 #[derive(Debug, PartialEq, Eq, Hash)]
2273 pub struct VNRecognizedPoints3DObservation;
2274);
2275
2276extern_conformance!(
2277 unsafe impl NSCoding for VNRecognizedPoints3DObservation {}
2278);
2279
2280extern_conformance!(
2281 unsafe impl NSCopying for VNRecognizedPoints3DObservation {}
2282);
2283
2284unsafe impl CopyingHelper for VNRecognizedPoints3DObservation {
2285 type Result = Self;
2286}
2287
2288extern_conformance!(
2289 unsafe impl NSObjectProtocol for VNRecognizedPoints3DObservation {}
2290);
2291
2292extern_conformance!(
2293 unsafe impl NSSecureCoding for VNRecognizedPoints3DObservation {}
2294);
2295
2296#[cfg(feature = "VNRequestRevisionProviding")]
2297extern_conformance!(
2298 unsafe impl VNRequestRevisionProviding for VNRecognizedPoints3DObservation {}
2299);
2300
2301impl VNRecognizedPoints3DObservation {
2302 extern_methods!(
2303 #[unsafe(method(new))]
2304 #[unsafe(method_family = new)]
2305 pub unsafe fn new() -> Retained<Self>;
2306
2307 #[unsafe(method(init))]
2308 #[unsafe(method_family = init)]
2309 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2310
2311 #[cfg(feature = "VNTypes")]
2312 #[unsafe(method(availableKeys))]
2314 #[unsafe(method_family = none)]
2315 pub unsafe fn availableKeys(&self) -> Retained<NSArray<VNRecognizedPointKey>>;
2316
2317 #[cfg(feature = "VNTypes")]
2318 #[unsafe(method(availableGroupKeys))]
2320 #[unsafe(method_family = none)]
2321 pub unsafe fn availableGroupKeys(&self) -> Retained<NSArray<VNRecognizedPointGroupKey>>;
2322
2323 #[cfg(all(
2324 feature = "VNGeometry",
2325 feature = "VNRecognizedPoint3D",
2326 feature = "VNTypes"
2327 ))]
2328 #[unsafe(method(recognizedPointForKey:error:_))]
2336 #[unsafe(method_family = none)]
2337 pub unsafe fn recognizedPointForKey_error(
2338 &self,
2339 point_key: &VNRecognizedPointKey,
2340 ) -> Result<Retained<VNRecognizedPoint3D>, Retained<NSError>>;
2341
2342 #[cfg(all(
2343 feature = "VNGeometry",
2344 feature = "VNRecognizedPoint3D",
2345 feature = "VNTypes"
2346 ))]
2347 #[unsafe(method(recognizedPointsForGroupKey:error:_))]
2357 #[unsafe(method_family = none)]
2358 pub unsafe fn recognizedPointsForGroupKey_error(
2359 &self,
2360 group_key: &VNRecognizedPointGroupKey,
2361 ) -> Result<
2362 Retained<NSDictionary<VNRecognizedPointKey, VNRecognizedPoint3D>>,
2363 Retained<NSError>,
2364 >;
2365 );
2366}
2367
2368#[repr(transparent)]
2377#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2378pub struct VNHumanBodyPose3DObservationHeightEstimation(pub NSInteger);
2379impl VNHumanBodyPose3DObservationHeightEstimation {
2380 #[doc(alias = "VNHumanBodyPose3DObservationHeightEstimationReference")]
2381 pub const Reference: Self = Self(0);
2382 #[doc(alias = "VNHumanBodyPose3DObservationHeightEstimationMeasured")]
2383 pub const Measured: Self = Self(1);
2384}
2385
2386unsafe impl Encode for VNHumanBodyPose3DObservationHeightEstimation {
2387 const ENCODING: Encoding = NSInteger::ENCODING;
2388}
2389
2390unsafe impl RefEncode for VNHumanBodyPose3DObservationHeightEstimation {
2391 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2392}
2393
2394extern_class!(
2395 #[unsafe(super(VNRecognizedPoints3DObservation, VNObservation, NSObject))]
2397 #[derive(Debug, PartialEq, Eq, Hash)]
2398 pub struct VNHumanBodyPose3DObservation;
2399);
2400
2401extern_conformance!(
2402 unsafe impl NSCoding for VNHumanBodyPose3DObservation {}
2403);
2404
2405extern_conformance!(
2406 unsafe impl NSCopying for VNHumanBodyPose3DObservation {}
2407);
2408
2409unsafe impl CopyingHelper for VNHumanBodyPose3DObservation {
2410 type Result = Self;
2411}
2412
2413extern_conformance!(
2414 unsafe impl NSObjectProtocol for VNHumanBodyPose3DObservation {}
2415);
2416
2417extern_conformance!(
2418 unsafe impl NSSecureCoding for VNHumanBodyPose3DObservation {}
2419);
2420
2421#[cfg(feature = "VNRequestRevisionProviding")]
2422extern_conformance!(
2423 unsafe impl VNRequestRevisionProviding for VNHumanBodyPose3DObservation {}
2424);
2425
2426impl VNHumanBodyPose3DObservation {
2427 extern_methods!(
2428 #[unsafe(method(heightEstimation))]
2431 #[unsafe(method_family = none)]
2432 pub unsafe fn heightEstimation(&self) -> VNHumanBodyPose3DObservationHeightEstimation;
2433
2434 #[cfg(feature = "VNTypes")]
2435 #[unsafe(method(availableJointsGroupNames))]
2437 #[unsafe(method_family = none)]
2438 pub unsafe fn availableJointsGroupNames(
2439 &self,
2440 ) -> Retained<NSArray<VNHumanBodyPose3DObservationJointsGroupName>>;
2441
2442 #[cfg(feature = "VNTypes")]
2443 #[unsafe(method(availableJointNames))]
2445 #[unsafe(method_family = none)]
2446 pub unsafe fn availableJointNames(
2447 &self,
2448 ) -> Retained<NSArray<VNHumanBodyPose3DObservationJointName>>;
2449
2450 #[unsafe(method(bodyHeight))]
2454 #[unsafe(method_family = none)]
2455 pub unsafe fn bodyHeight(&self) -> c_float;
2456
2457 #[cfg(all(
2458 feature = "VNGeometry",
2459 feature = "VNHumanBodyRecognizedPoint3D",
2460 feature = "VNRecognizedPoint3D",
2461 feature = "VNTypes"
2462 ))]
2463 #[unsafe(method(recognizedPointsForJointsGroupName:error:_))]
2473 #[unsafe(method_family = none)]
2474 pub unsafe fn recognizedPointsForJointsGroupName_error(
2475 &self,
2476 joints_group_name: &VNHumanBodyPose3DObservationJointsGroupName,
2477 ) -> Result<
2478 Retained<
2479 NSDictionary<VNHumanBodyPose3DObservationJointName, VNHumanBodyRecognizedPoint3D>,
2480 >,
2481 Retained<NSError>,
2482 >;
2483
2484 #[cfg(all(
2485 feature = "VNGeometry",
2486 feature = "VNHumanBodyRecognizedPoint3D",
2487 feature = "VNRecognizedPoint3D",
2488 feature = "VNTypes"
2489 ))]
2490 #[unsafe(method(recognizedPointForJointName:error:_))]
2501 #[unsafe(method_family = none)]
2502 pub unsafe fn recognizedPointForJointName_error(
2503 &self,
2504 joint_name: &VNHumanBodyPose3DObservationJointName,
2505 ) -> Result<Retained<VNHumanBodyRecognizedPoint3D>, Retained<NSError>>;
2506
2507 #[cfg(all(feature = "VNGeometry", feature = "VNTypes"))]
2508 #[unsafe(method(pointInImageForJointName:error:_))]
2514 #[unsafe(method_family = none)]
2515 pub unsafe fn pointInImageForJointName_error(
2516 &self,
2517 joint_name: &VNHumanBodyPose3DObservationJointName,
2518 ) -> Result<Retained<VNPoint>, Retained<NSError>>;
2519
2520 #[cfg(feature = "VNTypes")]
2521 #[unsafe(method(parentJointNameForJointName:))]
2527 #[unsafe(method_family = none)]
2528 pub unsafe fn parentJointNameForJointName(
2529 &self,
2530 joint_name: &VNHumanBodyPose3DObservationJointName,
2531 ) -> Option<Retained<VNHumanBodyPose3DObservationJointName>>;
2532 );
2533}
2534
2535impl VNHumanBodyPose3DObservation {
2537 extern_methods!(
2538 #[unsafe(method(new))]
2539 #[unsafe(method_family = new)]
2540 pub unsafe fn new() -> Retained<Self>;
2541
2542 #[unsafe(method(init))]
2543 #[unsafe(method_family = init)]
2544 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2545 );
2546}
2547
2548extern_class!(
2549 #[unsafe(super(VNObservation, NSObject))]
2553 #[derive(Debug, PartialEq, Eq, Hash)]
2554 pub struct VNImageAestheticsScoresObservation;
2555);
2556
2557extern_conformance!(
2558 unsafe impl NSCoding for VNImageAestheticsScoresObservation {}
2559);
2560
2561extern_conformance!(
2562 unsafe impl NSCopying for VNImageAestheticsScoresObservation {}
2563);
2564
2565unsafe impl CopyingHelper for VNImageAestheticsScoresObservation {
2566 type Result = Self;
2567}
2568
2569extern_conformance!(
2570 unsafe impl NSObjectProtocol for VNImageAestheticsScoresObservation {}
2571);
2572
2573extern_conformance!(
2574 unsafe impl NSSecureCoding for VNImageAestheticsScoresObservation {}
2575);
2576
2577#[cfg(feature = "VNRequestRevisionProviding")]
2578extern_conformance!(
2579 unsafe impl VNRequestRevisionProviding for VNImageAestheticsScoresObservation {}
2580);
2581
2582impl VNImageAestheticsScoresObservation {
2583 extern_methods!(
2584 #[unsafe(method(init))]
2585 #[unsafe(method_family = init)]
2586 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2587
2588 #[unsafe(method(isUtility))]
2590 #[unsafe(method_family = none)]
2591 pub unsafe fn isUtility(&self) -> bool;
2592
2593 #[unsafe(method(overallScore))]
2597 #[unsafe(method_family = none)]
2598 pub unsafe fn overallScore(&self) -> c_float;
2599 );
2600}
2601
2602impl VNImageAestheticsScoresObservation {
2604 extern_methods!(
2605 #[unsafe(method(new))]
2606 #[unsafe(method_family = new)]
2607 pub unsafe fn new() -> Retained<Self>;
2608 );
2609}