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 {
364 extern_methods!(
365 #[unsafe(method(hasPrecisionRecallCurve))]
369 #[unsafe(method_family = none)]
370 pub unsafe fn hasPrecisionRecallCurve(&self) -> bool;
371
372 #[unsafe(method(hasMinimumRecall:forPrecision:))]
383 #[unsafe(method_family = none)]
384 pub unsafe fn hasMinimumRecall_forPrecision(
385 &self,
386 minimum_recall: c_float,
387 precision: c_float,
388 ) -> bool;
389
390 #[unsafe(method(hasMinimumPrecision:forRecall:))]
401 #[unsafe(method_family = none)]
402 pub unsafe fn hasMinimumPrecision_forRecall(
403 &self,
404 minimum_precision: c_float,
405 recall: c_float,
406 ) -> bool;
407 );
408}
409
410extern_class!(
411 #[unsafe(super(VNDetectedObjectObservation, VNObservation, NSObject))]
415 #[derive(Debug, PartialEq, Eq, Hash)]
416 pub struct VNRecognizedObjectObservation;
417);
418
419extern_conformance!(
420 unsafe impl NSCoding for VNRecognizedObjectObservation {}
421);
422
423extern_conformance!(
424 unsafe impl NSCopying for VNRecognizedObjectObservation {}
425);
426
427unsafe impl CopyingHelper for VNRecognizedObjectObservation {
428 type Result = Self;
429}
430
431extern_conformance!(
432 unsafe impl NSObjectProtocol for VNRecognizedObjectObservation {}
433);
434
435extern_conformance!(
436 unsafe impl NSSecureCoding for VNRecognizedObjectObservation {}
437);
438
439#[cfg(feature = "VNRequestRevisionProviding")]
440extern_conformance!(
441 unsafe impl VNRequestRevisionProviding for VNRecognizedObjectObservation {}
442);
443
444impl VNRecognizedObjectObservation {
445 extern_methods!(
446 #[unsafe(method(labels))]
447 #[unsafe(method_family = none)]
448 pub unsafe fn labels(&self) -> Retained<NSArray<VNClassificationObservation>>;
449 );
450}
451
452impl VNRecognizedObjectObservation {
454 extern_methods!(
455 #[cfg(feature = "objc2-core-foundation")]
456 #[unsafe(method(observationWithBoundingBox:))]
458 #[unsafe(method_family = none)]
459 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
460
461 #[cfg(feature = "objc2-core-foundation")]
462 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
463 #[unsafe(method_family = none)]
464 pub unsafe fn observationWithRequestRevision_boundingBox(
465 request_revision: NSUInteger,
466 bounding_box: CGRect,
467 ) -> Retained<Self>;
468 );
469}
470
471impl VNRecognizedObjectObservation {
473 extern_methods!(
474 #[unsafe(method(init))]
475 #[unsafe(method_family = init)]
476 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
477
478 #[unsafe(method(new))]
479 #[unsafe(method_family = new)]
480 pub unsafe fn new() -> Retained<Self>;
481 );
482}
483
484extern_class!(
485 #[unsafe(super(VNObservation, NSObject))]
491 #[derive(Debug, PartialEq, Eq, Hash)]
492 pub struct VNCoreMLFeatureValueObservation;
493);
494
495extern_conformance!(
496 unsafe impl NSCoding for VNCoreMLFeatureValueObservation {}
497);
498
499extern_conformance!(
500 unsafe impl NSCopying for VNCoreMLFeatureValueObservation {}
501);
502
503unsafe impl CopyingHelper for VNCoreMLFeatureValueObservation {
504 type Result = Self;
505}
506
507extern_conformance!(
508 unsafe impl NSObjectProtocol for VNCoreMLFeatureValueObservation {}
509);
510
511extern_conformance!(
512 unsafe impl NSSecureCoding for VNCoreMLFeatureValueObservation {}
513);
514
515#[cfg(feature = "VNRequestRevisionProviding")]
516extern_conformance!(
517 unsafe impl VNRequestRevisionProviding for VNCoreMLFeatureValueObservation {}
518);
519
520impl VNCoreMLFeatureValueObservation {
521 extern_methods!(
522 #[cfg(feature = "objc2-core-ml")]
523 #[unsafe(method(featureValue))]
525 #[unsafe(method_family = none)]
526 pub unsafe fn featureValue(&self) -> Retained<MLFeatureValue>;
527
528 #[unsafe(method(featureName))]
530 #[unsafe(method_family = none)]
531 pub unsafe fn featureName(&self) -> Retained<NSString>;
532 );
533}
534
535impl VNCoreMLFeatureValueObservation {
537 extern_methods!(
538 #[unsafe(method(init))]
539 #[unsafe(method_family = init)]
540 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
541
542 #[unsafe(method(new))]
543 #[unsafe(method_family = new)]
544 pub unsafe fn new() -> Retained<Self>;
545 );
546}
547
548extern_class!(
549 #[unsafe(super(VNObservation, NSObject))]
555 #[derive(Debug, PartialEq, Eq, Hash)]
556 pub struct VNPixelBufferObservation;
557);
558
559extern_conformance!(
560 unsafe impl NSCoding for VNPixelBufferObservation {}
561);
562
563extern_conformance!(
564 unsafe impl NSCopying for VNPixelBufferObservation {}
565);
566
567unsafe impl CopyingHelper for VNPixelBufferObservation {
568 type Result = Self;
569}
570
571extern_conformance!(
572 unsafe impl NSObjectProtocol for VNPixelBufferObservation {}
573);
574
575extern_conformance!(
576 unsafe impl NSSecureCoding for VNPixelBufferObservation {}
577);
578
579#[cfg(feature = "VNRequestRevisionProviding")]
580extern_conformance!(
581 unsafe impl VNRequestRevisionProviding for VNPixelBufferObservation {}
582);
583
584impl VNPixelBufferObservation {
585 extern_methods!(
586 #[cfg(feature = "objc2-core-video")]
587 #[unsafe(method(pixelBuffer))]
589 #[unsafe(method_family = none)]
590 pub unsafe fn pixelBuffer(&self) -> Retained<CVPixelBuffer>;
591
592 #[unsafe(method(featureName))]
594 #[unsafe(method_family = none)]
595 pub unsafe fn featureName(&self) -> Option<Retained<NSString>>;
596 );
597}
598
599impl VNPixelBufferObservation {
601 extern_methods!(
602 #[unsafe(method(init))]
603 #[unsafe(method_family = init)]
604 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
605
606 #[unsafe(method(new))]
607 #[unsafe(method_family = new)]
608 pub unsafe fn new() -> Retained<Self>;
609 );
610}
611
612extern_class!(
613 #[unsafe(super(VNDetectedObjectObservation, VNObservation, NSObject))]
619 #[derive(Debug, PartialEq, Eq, Hash)]
620 pub struct VNRectangleObservation;
621);
622
623extern_conformance!(
624 unsafe impl NSCoding for VNRectangleObservation {}
625);
626
627extern_conformance!(
628 unsafe impl NSCopying for VNRectangleObservation {}
629);
630
631unsafe impl CopyingHelper for VNRectangleObservation {
632 type Result = Self;
633}
634
635extern_conformance!(
636 unsafe impl NSObjectProtocol for VNRectangleObservation {}
637);
638
639extern_conformance!(
640 unsafe impl NSSecureCoding for VNRectangleObservation {}
641);
642
643#[cfg(feature = "VNRequestRevisionProviding")]
644extern_conformance!(
645 unsafe impl VNRequestRevisionProviding for VNRectangleObservation {}
646);
647
648impl VNRectangleObservation {
649 extern_methods!(
650 #[cfg(feature = "objc2-core-foundation")]
651 #[deprecated]
666 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
667 #[unsafe(method_family = none)]
668 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
669 request_revision: NSUInteger,
670 top_left: CGPoint,
671 bottom_left: CGPoint,
672 bottom_right: CGPoint,
673 top_right: CGPoint,
674 ) -> Retained<Self>;
675
676 #[cfg(feature = "objc2-core-foundation")]
677 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
690 #[unsafe(method_family = none)]
691 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
692 request_revision: NSUInteger,
693 top_left: CGPoint,
694 top_right: CGPoint,
695 bottom_right: CGPoint,
696 bottom_left: CGPoint,
697 ) -> Retained<Self>;
698
699 #[cfg(feature = "objc2-core-foundation")]
700 #[unsafe(method(topLeft))]
701 #[unsafe(method_family = none)]
702 pub unsafe fn topLeft(&self) -> CGPoint;
703
704 #[cfg(feature = "objc2-core-foundation")]
705 #[unsafe(method(topRight))]
706 #[unsafe(method_family = none)]
707 pub unsafe fn topRight(&self) -> CGPoint;
708
709 #[cfg(feature = "objc2-core-foundation")]
710 #[unsafe(method(bottomLeft))]
711 #[unsafe(method_family = none)]
712 pub unsafe fn bottomLeft(&self) -> CGPoint;
713
714 #[cfg(feature = "objc2-core-foundation")]
715 #[unsafe(method(bottomRight))]
716 #[unsafe(method_family = none)]
717 pub unsafe fn bottomRight(&self) -> CGPoint;
718 );
719}
720
721impl VNRectangleObservation {
723 extern_methods!(
724 #[cfg(feature = "objc2-core-foundation")]
725 #[unsafe(method(observationWithBoundingBox:))]
727 #[unsafe(method_family = none)]
728 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
729
730 #[cfg(feature = "objc2-core-foundation")]
731 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
732 #[unsafe(method_family = none)]
733 pub unsafe fn observationWithRequestRevision_boundingBox(
734 request_revision: NSUInteger,
735 bounding_box: CGRect,
736 ) -> Retained<Self>;
737 );
738}
739
740impl VNRectangleObservation {
742 extern_methods!(
743 #[unsafe(method(init))]
744 #[unsafe(method_family = init)]
745 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
746
747 #[unsafe(method(new))]
748 #[unsafe(method_family = new)]
749 pub unsafe fn new() -> Retained<Self>;
750 );
751}
752
753extern_class!(
754 #[unsafe(super(VNObservation, NSObject))]
758 #[derive(Debug, PartialEq, Eq, Hash)]
759 pub struct VNTrajectoryObservation;
760);
761
762extern_conformance!(
763 unsafe impl NSCoding for VNTrajectoryObservation {}
764);
765
766extern_conformance!(
767 unsafe impl NSCopying for VNTrajectoryObservation {}
768);
769
770unsafe impl CopyingHelper for VNTrajectoryObservation {
771 type Result = Self;
772}
773
774extern_conformance!(
775 unsafe impl NSObjectProtocol for VNTrajectoryObservation {}
776);
777
778extern_conformance!(
779 unsafe impl NSSecureCoding for VNTrajectoryObservation {}
780);
781
782#[cfg(feature = "VNRequestRevisionProviding")]
783extern_conformance!(
784 unsafe impl VNRequestRevisionProviding for VNTrajectoryObservation {}
785);
786
787impl VNTrajectoryObservation {
788 extern_methods!(
789 #[cfg(feature = "VNGeometry")]
790 #[unsafe(method(detectedPoints))]
794 #[unsafe(method_family = none)]
795 pub unsafe fn detectedPoints(&self) -> Retained<NSArray<VNPoint>>;
796
797 #[cfg(feature = "VNGeometry")]
798 #[unsafe(method(projectedPoints))]
802 #[unsafe(method_family = none)]
803 pub unsafe fn projectedPoints(&self) -> Retained<NSArray<VNPoint>>;
804
805 #[cfg(feature = "objc2-core-foundation")]
806 #[unsafe(method(movingAverageRadius))]
810 #[unsafe(method_family = none)]
811 pub unsafe fn movingAverageRadius(&self) -> CGFloat;
812 );
813}
814
815impl VNTrajectoryObservation {
817 extern_methods!(
818 #[unsafe(method(init))]
819 #[unsafe(method_family = init)]
820 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
821
822 #[unsafe(method(new))]
823 #[unsafe(method_family = new)]
824 pub unsafe fn new() -> Retained<Self>;
825 );
826}
827
828extern_class!(
829 #[unsafe(super(
833 VNRectangleObservation,
834 VNDetectedObjectObservation,
835 VNObservation,
836 NSObject
837 ))]
838 #[derive(Debug, PartialEq, Eq, Hash)]
839 pub struct VNTextObservation;
840);
841
842extern_conformance!(
843 unsafe impl NSCoding for VNTextObservation {}
844);
845
846extern_conformance!(
847 unsafe impl NSCopying for VNTextObservation {}
848);
849
850unsafe impl CopyingHelper for VNTextObservation {
851 type Result = Self;
852}
853
854extern_conformance!(
855 unsafe impl NSObjectProtocol for VNTextObservation {}
856);
857
858extern_conformance!(
859 unsafe impl NSSecureCoding for VNTextObservation {}
860);
861
862#[cfg(feature = "VNRequestRevisionProviding")]
863extern_conformance!(
864 unsafe impl VNRequestRevisionProviding for VNTextObservation {}
865);
866
867impl VNTextObservation {
868 extern_methods!(
869 #[unsafe(method(characterBoxes))]
874 #[unsafe(method_family = none)]
875 pub unsafe fn characterBoxes(&self) -> Option<Retained<NSArray<VNRectangleObservation>>>;
876 );
877}
878
879impl VNTextObservation {
881 extern_methods!(
882 #[cfg(feature = "objc2-core-foundation")]
883 #[deprecated]
898 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
899 #[unsafe(method_family = none)]
900 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
901 request_revision: NSUInteger,
902 top_left: CGPoint,
903 bottom_left: CGPoint,
904 bottom_right: CGPoint,
905 top_right: CGPoint,
906 ) -> Retained<Self>;
907
908 #[cfg(feature = "objc2-core-foundation")]
909 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
922 #[unsafe(method_family = none)]
923 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
924 request_revision: NSUInteger,
925 top_left: CGPoint,
926 top_right: CGPoint,
927 bottom_right: CGPoint,
928 bottom_left: CGPoint,
929 ) -> Retained<Self>;
930 );
931}
932
933impl VNTextObservation {
935 extern_methods!(
936 #[cfg(feature = "objc2-core-foundation")]
937 #[unsafe(method(observationWithBoundingBox:))]
939 #[unsafe(method_family = none)]
940 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
941
942 #[cfg(feature = "objc2-core-foundation")]
943 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
944 #[unsafe(method_family = none)]
945 pub unsafe fn observationWithRequestRevision_boundingBox(
946 request_revision: NSUInteger,
947 bounding_box: CGRect,
948 ) -> Retained<Self>;
949 );
950}
951
952impl VNTextObservation {
954 extern_methods!(
955 #[unsafe(method(init))]
956 #[unsafe(method_family = init)]
957 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
958
959 #[unsafe(method(new))]
960 #[unsafe(method_family = new)]
961 pub unsafe fn new() -> Retained<Self>;
962 );
963}
964
965extern_class!(
966 #[unsafe(super(NSObject))]
970 #[derive(Debug, PartialEq, Eq, Hash)]
971 pub struct VNRecognizedText;
972);
973
974extern_conformance!(
975 unsafe impl NSCoding for VNRecognizedText {}
976);
977
978extern_conformance!(
979 unsafe impl NSCopying for VNRecognizedText {}
980);
981
982unsafe impl CopyingHelper for VNRecognizedText {
983 type Result = Self;
984}
985
986extern_conformance!(
987 unsafe impl NSObjectProtocol for VNRecognizedText {}
988);
989
990extern_conformance!(
991 unsafe impl NSSecureCoding for VNRecognizedText {}
992);
993
994#[cfg(feature = "VNRequestRevisionProviding")]
995extern_conformance!(
996 unsafe impl VNRequestRevisionProviding for VNRecognizedText {}
997);
998
999impl VNRecognizedText {
1000 extern_methods!(
1001 #[unsafe(method(string))]
1005 #[unsafe(method_family = none)]
1006 pub fn string(&self) -> Retained<NSString>;
1007
1008 #[cfg(feature = "VNTypes")]
1009 #[unsafe(method(confidence))]
1011 #[unsafe(method_family = none)]
1012 pub fn confidence(&self) -> VNConfidence;
1013 );
1014}
1015
1016impl VNRecognizedText {
1018 extern_methods!(
1019 #[unsafe(method(init))]
1020 #[unsafe(method_family = init)]
1021 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1022
1023 #[unsafe(method(new))]
1024 #[unsafe(method_family = new)]
1025 pub unsafe fn new() -> Retained<Self>;
1026 );
1027}
1028
1029extern_class!(
1030 #[unsafe(super(
1034 VNRectangleObservation,
1035 VNDetectedObjectObservation,
1036 VNObservation,
1037 NSObject
1038 ))]
1039 #[derive(Debug, PartialEq, Eq, Hash)]
1040 pub struct VNRecognizedTextObservation;
1041);
1042
1043extern_conformance!(
1044 unsafe impl NSCoding for VNRecognizedTextObservation {}
1045);
1046
1047extern_conformance!(
1048 unsafe impl NSCopying for VNRecognizedTextObservation {}
1049);
1050
1051unsafe impl CopyingHelper for VNRecognizedTextObservation {
1052 type Result = Self;
1053}
1054
1055extern_conformance!(
1056 unsafe impl NSObjectProtocol for VNRecognizedTextObservation {}
1057);
1058
1059extern_conformance!(
1060 unsafe impl NSSecureCoding for VNRecognizedTextObservation {}
1061);
1062
1063#[cfg(feature = "VNRequestRevisionProviding")]
1064extern_conformance!(
1065 unsafe impl VNRequestRevisionProviding for VNRecognizedTextObservation {}
1066);
1067
1068impl VNRecognizedTextObservation {
1069 extern_methods!(
1070 #[unsafe(method(topCandidates:))]
1074 #[unsafe(method_family = none)]
1075 pub fn topCandidates(
1076 &self,
1077 max_candidate_count: NSUInteger,
1078 ) -> Retained<NSArray<VNRecognizedText>>;
1079 );
1080}
1081
1082impl VNRecognizedTextObservation {
1084 extern_methods!(
1085 #[cfg(feature = "objc2-core-foundation")]
1086 #[deprecated]
1101 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
1102 #[unsafe(method_family = none)]
1103 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
1104 request_revision: NSUInteger,
1105 top_left: CGPoint,
1106 bottom_left: CGPoint,
1107 bottom_right: CGPoint,
1108 top_right: CGPoint,
1109 ) -> Retained<Self>;
1110
1111 #[cfg(feature = "objc2-core-foundation")]
1112 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
1125 #[unsafe(method_family = none)]
1126 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
1127 request_revision: NSUInteger,
1128 top_left: CGPoint,
1129 top_right: CGPoint,
1130 bottom_right: CGPoint,
1131 bottom_left: CGPoint,
1132 ) -> Retained<Self>;
1133 );
1134}
1135
1136impl VNRecognizedTextObservation {
1138 extern_methods!(
1139 #[cfg(feature = "objc2-core-foundation")]
1140 #[unsafe(method(observationWithBoundingBox:))]
1142 #[unsafe(method_family = none)]
1143 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
1144
1145 #[cfg(feature = "objc2-core-foundation")]
1146 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
1147 #[unsafe(method_family = none)]
1148 pub unsafe fn observationWithRequestRevision_boundingBox(
1149 request_revision: NSUInteger,
1150 bounding_box: CGRect,
1151 ) -> Retained<Self>;
1152 );
1153}
1154
1155impl VNRecognizedTextObservation {
1157 extern_methods!(
1158 #[unsafe(method(init))]
1159 #[unsafe(method_family = init)]
1160 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1161
1162 #[unsafe(method(new))]
1163 #[unsafe(method_family = new)]
1164 pub unsafe fn new() -> Retained<Self>;
1165 );
1166}
1167
1168extern_class!(
1169 #[unsafe(super(
1173 VNRectangleObservation,
1174 VNDetectedObjectObservation,
1175 VNObservation,
1176 NSObject
1177 ))]
1178 #[derive(Debug, PartialEq, Eq, Hash)]
1179 pub struct VNBarcodeObservation;
1180);
1181
1182extern_conformance!(
1183 unsafe impl NSCoding for VNBarcodeObservation {}
1184);
1185
1186extern_conformance!(
1187 unsafe impl NSCopying for VNBarcodeObservation {}
1188);
1189
1190unsafe impl CopyingHelper for VNBarcodeObservation {
1191 type Result = Self;
1192}
1193
1194extern_conformance!(
1195 unsafe impl NSObjectProtocol for VNBarcodeObservation {}
1196);
1197
1198extern_conformance!(
1199 unsafe impl NSSecureCoding for VNBarcodeObservation {}
1200);
1201
1202#[cfg(feature = "VNRequestRevisionProviding")]
1203extern_conformance!(
1204 unsafe impl VNRequestRevisionProviding for VNBarcodeObservation {}
1205);
1206
1207impl VNBarcodeObservation {
1208 extern_methods!(
1209 #[cfg(feature = "VNTypes")]
1210 #[unsafe(method(symbology))]
1212 #[unsafe(method_family = none)]
1213 pub unsafe fn symbology(&self) -> Retained<VNBarcodeSymbology>;
1214
1215 #[cfg(feature = "objc2-core-image")]
1216 #[unsafe(method(barcodeDescriptor))]
1218 #[unsafe(method_family = none)]
1219 pub unsafe fn barcodeDescriptor(&self) -> Option<Retained<CIBarcodeDescriptor>>;
1220
1221 #[unsafe(method(payloadStringValue))]
1223 #[unsafe(method_family = none)]
1224 pub unsafe fn payloadStringValue(&self) -> Option<Retained<NSString>>;
1225
1226 #[unsafe(method(payloadData))]
1228 #[unsafe(method_family = none)]
1229 pub unsafe fn payloadData(&self) -> Option<Retained<NSData>>;
1230
1231 #[unsafe(method(isGS1DataCarrier))]
1233 #[unsafe(method_family = none)]
1234 pub unsafe fn isGS1DataCarrier(&self) -> bool;
1235
1236 #[unsafe(method(isColorInverted))]
1238 #[unsafe(method_family = none)]
1239 pub unsafe fn isColorInverted(&self) -> bool;
1240
1241 #[cfg(feature = "VNTypes")]
1242 #[unsafe(method(supplementalCompositeType))]
1245 #[unsafe(method_family = none)]
1246 pub unsafe fn supplementalCompositeType(&self) -> VNBarcodeCompositeType;
1247
1248 #[unsafe(method(supplementalPayloadString))]
1251 #[unsafe(method_family = none)]
1252 pub unsafe fn supplementalPayloadString(&self) -> Option<Retained<NSString>>;
1253
1254 #[unsafe(method(supplementalPayloadData))]
1257 #[unsafe(method_family = none)]
1258 pub unsafe fn supplementalPayloadData(&self) -> Option<Retained<NSData>>;
1259 );
1260}
1261
1262impl VNBarcodeObservation {
1264 extern_methods!(
1265 #[cfg(feature = "objc2-core-foundation")]
1266 #[deprecated]
1281 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:bottomLeft:bottomRight:topRight:))]
1282 #[unsafe(method_family = none)]
1283 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_bottomLeft_bottomRight_topRight(
1284 request_revision: NSUInteger,
1285 top_left: CGPoint,
1286 bottom_left: CGPoint,
1287 bottom_right: CGPoint,
1288 top_right: CGPoint,
1289 ) -> Retained<Self>;
1290
1291 #[cfg(feature = "objc2-core-foundation")]
1292 #[unsafe(method(rectangleObservationWithRequestRevision:topLeft:topRight:bottomRight:bottomLeft:))]
1305 #[unsafe(method_family = none)]
1306 pub unsafe fn rectangleObservationWithRequestRevision_topLeft_topRight_bottomRight_bottomLeft(
1307 request_revision: NSUInteger,
1308 top_left: CGPoint,
1309 top_right: CGPoint,
1310 bottom_right: CGPoint,
1311 bottom_left: CGPoint,
1312 ) -> Retained<Self>;
1313 );
1314}
1315
1316impl VNBarcodeObservation {
1318 extern_methods!(
1319 #[cfg(feature = "objc2-core-foundation")]
1320 #[unsafe(method(observationWithBoundingBox:))]
1322 #[unsafe(method_family = none)]
1323 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
1324
1325 #[cfg(feature = "objc2-core-foundation")]
1326 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
1327 #[unsafe(method_family = none)]
1328 pub unsafe fn observationWithRequestRevision_boundingBox(
1329 request_revision: NSUInteger,
1330 bounding_box: CGRect,
1331 ) -> Retained<Self>;
1332 );
1333}
1334
1335impl VNBarcodeObservation {
1337 extern_methods!(
1338 #[unsafe(method(init))]
1339 #[unsafe(method_family = init)]
1340 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1341
1342 #[unsafe(method(new))]
1343 #[unsafe(method_family = new)]
1344 pub unsafe fn new() -> Retained<Self>;
1345 );
1346}
1347
1348extern_class!(
1349 #[unsafe(super(VNObservation, NSObject))]
1355 #[derive(Debug, PartialEq, Eq, Hash)]
1356 pub struct VNHorizonObservation;
1357);
1358
1359extern_conformance!(
1360 unsafe impl NSCoding for VNHorizonObservation {}
1361);
1362
1363extern_conformance!(
1364 unsafe impl NSCopying for VNHorizonObservation {}
1365);
1366
1367unsafe impl CopyingHelper for VNHorizonObservation {
1368 type Result = Self;
1369}
1370
1371extern_conformance!(
1372 unsafe impl NSObjectProtocol for VNHorizonObservation {}
1373);
1374
1375extern_conformance!(
1376 unsafe impl NSSecureCoding for VNHorizonObservation {}
1377);
1378
1379#[cfg(feature = "VNRequestRevisionProviding")]
1380extern_conformance!(
1381 unsafe impl VNRequestRevisionProviding for VNHorizonObservation {}
1382);
1383
1384impl VNHorizonObservation {
1385 extern_methods!(
1386 #[cfg(feature = "objc2-core-foundation")]
1387 #[unsafe(method(transform))]
1391 #[unsafe(method_family = none)]
1392 pub unsafe fn transform(&self) -> CGAffineTransform;
1393
1394 #[cfg(feature = "objc2-core-foundation")]
1395 #[unsafe(method(angle))]
1397 #[unsafe(method_family = none)]
1398 pub unsafe fn angle(&self) -> CGFloat;
1399
1400 #[cfg(feature = "objc2-core-foundation")]
1401 #[unsafe(method(transformForImageWidth:height:))]
1403 #[unsafe(method_family = none)]
1404 pub unsafe fn transformForImageWidth_height(
1405 &self,
1406 width: usize,
1407 height: usize,
1408 ) -> CGAffineTransform;
1409 );
1410}
1411
1412impl VNHorizonObservation {
1414 extern_methods!(
1415 #[unsafe(method(init))]
1416 #[unsafe(method_family = init)]
1417 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1418
1419 #[unsafe(method(new))]
1420 #[unsafe(method_family = new)]
1421 pub unsafe fn new() -> Retained<Self>;
1422 );
1423}
1424
1425extern_class!(
1426 #[unsafe(super(VNObservation, NSObject))]
1430 #[derive(Debug, PartialEq, Eq, Hash)]
1431 pub struct VNImageAlignmentObservation;
1432);
1433
1434extern_conformance!(
1435 unsafe impl NSCoding for VNImageAlignmentObservation {}
1436);
1437
1438extern_conformance!(
1439 unsafe impl NSCopying for VNImageAlignmentObservation {}
1440);
1441
1442unsafe impl CopyingHelper for VNImageAlignmentObservation {
1443 type Result = Self;
1444}
1445
1446extern_conformance!(
1447 unsafe impl NSObjectProtocol for VNImageAlignmentObservation {}
1448);
1449
1450extern_conformance!(
1451 unsafe impl NSSecureCoding for VNImageAlignmentObservation {}
1452);
1453
1454#[cfg(feature = "VNRequestRevisionProviding")]
1455extern_conformance!(
1456 unsafe impl VNRequestRevisionProviding for VNImageAlignmentObservation {}
1457);
1458
1459impl VNImageAlignmentObservation {
1460 extern_methods!();
1461}
1462
1463impl VNImageAlignmentObservation {
1465 extern_methods!(
1466 #[unsafe(method(init))]
1467 #[unsafe(method_family = init)]
1468 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1469
1470 #[unsafe(method(new))]
1471 #[unsafe(method_family = new)]
1472 pub unsafe fn new() -> Retained<Self>;
1473 );
1474}
1475
1476extern_class!(
1477 #[unsafe(super(VNImageAlignmentObservation, VNObservation, NSObject))]
1481 #[derive(Debug, PartialEq, Eq, Hash)]
1482 pub struct VNImageTranslationAlignmentObservation;
1483);
1484
1485extern_conformance!(
1486 unsafe impl NSCoding for VNImageTranslationAlignmentObservation {}
1487);
1488
1489extern_conformance!(
1490 unsafe impl NSCopying for VNImageTranslationAlignmentObservation {}
1491);
1492
1493unsafe impl CopyingHelper for VNImageTranslationAlignmentObservation {
1494 type Result = Self;
1495}
1496
1497extern_conformance!(
1498 unsafe impl NSObjectProtocol for VNImageTranslationAlignmentObservation {}
1499);
1500
1501extern_conformance!(
1502 unsafe impl NSSecureCoding for VNImageTranslationAlignmentObservation {}
1503);
1504
1505#[cfg(feature = "VNRequestRevisionProviding")]
1506extern_conformance!(
1507 unsafe impl VNRequestRevisionProviding for VNImageTranslationAlignmentObservation {}
1508);
1509
1510impl VNImageTranslationAlignmentObservation {
1511 extern_methods!(
1512 #[cfg(feature = "objc2-core-foundation")]
1513 #[unsafe(method(alignmentTransform))]
1514 #[unsafe(method_family = none)]
1515 pub unsafe fn alignmentTransform(&self) -> CGAffineTransform;
1516 );
1517}
1518
1519impl VNImageTranslationAlignmentObservation {
1521 extern_methods!(
1522 #[unsafe(method(init))]
1523 #[unsafe(method_family = init)]
1524 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1525
1526 #[unsafe(method(new))]
1527 #[unsafe(method_family = new)]
1528 pub unsafe fn new() -> Retained<Self>;
1529 );
1530}
1531
1532extern_class!(
1533 #[unsafe(super(VNImageAlignmentObservation, VNObservation, NSObject))]
1537 #[derive(Debug, PartialEq, Eq, Hash)]
1538 pub struct VNImageHomographicAlignmentObservation;
1539);
1540
1541extern_conformance!(
1542 unsafe impl NSCoding for VNImageHomographicAlignmentObservation {}
1543);
1544
1545extern_conformance!(
1546 unsafe impl NSCopying for VNImageHomographicAlignmentObservation {}
1547);
1548
1549unsafe impl CopyingHelper for VNImageHomographicAlignmentObservation {
1550 type Result = Self;
1551}
1552
1553extern_conformance!(
1554 unsafe impl NSObjectProtocol for VNImageHomographicAlignmentObservation {}
1555);
1556
1557extern_conformance!(
1558 unsafe impl NSSecureCoding for VNImageHomographicAlignmentObservation {}
1559);
1560
1561#[cfg(feature = "VNRequestRevisionProviding")]
1562extern_conformance!(
1563 unsafe impl VNRequestRevisionProviding for VNImageHomographicAlignmentObservation {}
1564);
1565
1566impl VNImageHomographicAlignmentObservation {
1567 extern_methods!();
1568}
1569
1570impl VNImageHomographicAlignmentObservation {
1572 extern_methods!(
1573 #[unsafe(method(init))]
1574 #[unsafe(method_family = init)]
1575 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1576
1577 #[unsafe(method(new))]
1578 #[unsafe(method_family = new)]
1579 pub unsafe fn new() -> Retained<Self>;
1580 );
1581}
1582
1583extern_class!(
1584 #[unsafe(super(VNPixelBufferObservation, VNObservation, NSObject))]
1590 #[derive(Debug, PartialEq, Eq, Hash)]
1591 pub struct VNSaliencyImageObservation;
1592);
1593
1594extern_conformance!(
1595 unsafe impl NSCoding for VNSaliencyImageObservation {}
1596);
1597
1598extern_conformance!(
1599 unsafe impl NSCopying for VNSaliencyImageObservation {}
1600);
1601
1602unsafe impl CopyingHelper for VNSaliencyImageObservation {
1603 type Result = Self;
1604}
1605
1606extern_conformance!(
1607 unsafe impl NSObjectProtocol for VNSaliencyImageObservation {}
1608);
1609
1610extern_conformance!(
1611 unsafe impl NSSecureCoding for VNSaliencyImageObservation {}
1612);
1613
1614#[cfg(feature = "VNRequestRevisionProviding")]
1615extern_conformance!(
1616 unsafe impl VNRequestRevisionProviding for VNSaliencyImageObservation {}
1617);
1618
1619impl VNSaliencyImageObservation {
1620 extern_methods!(
1621 #[unsafe(method(salientObjects))]
1623 #[unsafe(method_family = none)]
1624 pub unsafe fn salientObjects(&self) -> Option<Retained<NSArray<VNRectangleObservation>>>;
1625 );
1626}
1627
1628impl VNSaliencyImageObservation {
1630 extern_methods!(
1631 #[unsafe(method(init))]
1632 #[unsafe(method_family = init)]
1633 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1634
1635 #[unsafe(method(new))]
1636 #[unsafe(method_family = new)]
1637 pub unsafe fn new() -> Retained<Self>;
1638 );
1639}
1640
1641extern_class!(
1642 #[unsafe(super(VNObservation, NSObject))]
1644 #[derive(Debug, PartialEq, Eq, Hash)]
1645 pub struct VNFeaturePrintObservation;
1646);
1647
1648extern_conformance!(
1649 unsafe impl NSCoding for VNFeaturePrintObservation {}
1650);
1651
1652extern_conformance!(
1653 unsafe impl NSCopying for VNFeaturePrintObservation {}
1654);
1655
1656unsafe impl CopyingHelper for VNFeaturePrintObservation {
1657 type Result = Self;
1658}
1659
1660extern_conformance!(
1661 unsafe impl NSObjectProtocol for VNFeaturePrintObservation {}
1662);
1663
1664extern_conformance!(
1665 unsafe impl NSSecureCoding for VNFeaturePrintObservation {}
1666);
1667
1668#[cfg(feature = "VNRequestRevisionProviding")]
1669extern_conformance!(
1670 unsafe impl VNRequestRevisionProviding for VNFeaturePrintObservation {}
1671);
1672
1673impl VNFeaturePrintObservation {
1674 extern_methods!(
1675 #[cfg(feature = "VNTypes")]
1676 #[unsafe(method(elementType))]
1678 #[unsafe(method_family = none)]
1679 pub unsafe fn elementType(&self) -> VNElementType;
1680
1681 #[unsafe(method(elementCount))]
1683 #[unsafe(method_family = none)]
1684 pub unsafe fn elementCount(&self) -> NSUInteger;
1685
1686 #[unsafe(method(data))]
1688 #[unsafe(method_family = none)]
1689 pub unsafe fn data(&self) -> Retained<NSData>;
1690
1691 #[unsafe(method(computeDistance:toFeaturePrintObservation:error:_))]
1695 #[unsafe(method_family = none)]
1696 pub unsafe fn computeDistance_toFeaturePrintObservation_error(
1697 &self,
1698 out_distance: NonNull<c_float>,
1699 feature_print: &VNFeaturePrintObservation,
1700 ) -> Result<(), Retained<NSError>>;
1701 );
1702}
1703
1704impl VNFeaturePrintObservation {
1706 extern_methods!(
1707 #[unsafe(method(init))]
1708 #[unsafe(method_family = init)]
1709 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1710
1711 #[unsafe(method(new))]
1712 #[unsafe(method_family = new)]
1713 pub unsafe fn new() -> Retained<Self>;
1714 );
1715}
1716
1717extern_class!(
1718 #[unsafe(super(VNObservation, NSObject))]
1720 #[derive(Debug, PartialEq, Eq, Hash)]
1721 pub struct VNContoursObservation;
1722);
1723
1724extern_conformance!(
1725 unsafe impl NSCoding for VNContoursObservation {}
1726);
1727
1728extern_conformance!(
1729 unsafe impl NSCopying for VNContoursObservation {}
1730);
1731
1732unsafe impl CopyingHelper for VNContoursObservation {
1733 type Result = Self;
1734}
1735
1736extern_conformance!(
1737 unsafe impl NSObjectProtocol for VNContoursObservation {}
1738);
1739
1740extern_conformance!(
1741 unsafe impl NSSecureCoding for VNContoursObservation {}
1742);
1743
1744#[cfg(feature = "VNRequestRevisionProviding")]
1745extern_conformance!(
1746 unsafe impl VNRequestRevisionProviding for VNContoursObservation {}
1747);
1748
1749impl VNContoursObservation {
1750 extern_methods!(
1751 #[unsafe(method(contourCount))]
1753 #[unsafe(method_family = none)]
1754 pub unsafe fn contourCount(&self) -> NSInteger;
1755
1756 #[cfg(feature = "VNGeometry")]
1757 #[unsafe(method(contourAtIndex:error:_))]
1765 #[unsafe(method_family = none)]
1766 pub unsafe fn contourAtIndex_error(
1767 &self,
1768 contour_index: NSInteger,
1769 ) -> Result<Retained<VNContour>, Retained<NSError>>;
1770
1771 #[unsafe(method(topLevelContourCount))]
1773 #[unsafe(method_family = none)]
1774 pub unsafe fn topLevelContourCount(&self) -> NSInteger;
1775
1776 #[cfg(feature = "VNGeometry")]
1777 #[unsafe(method(topLevelContours))]
1783 #[unsafe(method_family = none)]
1784 pub unsafe fn topLevelContours(&self) -> Retained<NSArray<VNContour>>;
1785
1786 #[cfg(feature = "VNGeometry")]
1787 #[unsafe(method(contourAtIndexPath:error:_))]
1797 #[unsafe(method_family = none)]
1798 pub unsafe fn contourAtIndexPath_error(
1799 &self,
1800 index_path: &NSIndexPath,
1801 ) -> Result<Retained<VNContour>, Retained<NSError>>;
1802
1803 #[cfg(feature = "objc2-core-graphics")]
1804 #[unsafe(method(normalizedPath))]
1808 #[unsafe(method_family = none)]
1809 pub unsafe fn normalizedPath(&self) -> Retained<CGPath>;
1810 );
1811}
1812
1813impl VNContoursObservation {
1815 extern_methods!(
1816 #[unsafe(method(init))]
1817 #[unsafe(method_family = init)]
1818 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1819
1820 #[unsafe(method(new))]
1821 #[unsafe(method_family = new)]
1822 pub unsafe fn new() -> Retained<Self>;
1823 );
1824}
1825
1826extern "C" {
1827 #[cfg(feature = "VNTypes")]
1829 pub static VNRecognizedPointGroupKeyAll: &'static VNRecognizedPointGroupKey;
1830}
1831
1832extern_class!(
1833 #[unsafe(super(VNObservation, NSObject))]
1837 #[derive(Debug, PartialEq, Eq, Hash)]
1838 pub struct VNRecognizedPointsObservation;
1839);
1840
1841extern_conformance!(
1842 unsafe impl NSCoding for VNRecognizedPointsObservation {}
1843);
1844
1845extern_conformance!(
1846 unsafe impl NSCopying for VNRecognizedPointsObservation {}
1847);
1848
1849unsafe impl CopyingHelper for VNRecognizedPointsObservation {
1850 type Result = Self;
1851}
1852
1853extern_conformance!(
1854 unsafe impl NSObjectProtocol for VNRecognizedPointsObservation {}
1855);
1856
1857extern_conformance!(
1858 unsafe impl NSSecureCoding for VNRecognizedPointsObservation {}
1859);
1860
1861#[cfg(feature = "VNRequestRevisionProviding")]
1862extern_conformance!(
1863 unsafe impl VNRequestRevisionProviding for VNRecognizedPointsObservation {}
1864);
1865
1866impl VNRecognizedPointsObservation {
1867 extern_methods!(
1868 #[unsafe(method(new))]
1869 #[unsafe(method_family = new)]
1870 pub unsafe fn new() -> Retained<Self>;
1871
1872 #[unsafe(method(init))]
1873 #[unsafe(method_family = init)]
1874 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1875
1876 #[cfg(feature = "VNTypes")]
1877 #[unsafe(method(availableKeys))]
1879 #[unsafe(method_family = none)]
1880 pub unsafe fn availableKeys(&self) -> Retained<NSArray<VNRecognizedPointKey>>;
1881
1882 #[cfg(feature = "VNTypes")]
1883 #[unsafe(method(availableGroupKeys))]
1885 #[unsafe(method_family = none)]
1886 pub unsafe fn availableGroupKeys(&self) -> Retained<NSArray<VNRecognizedPointGroupKey>>;
1887
1888 #[cfg(all(
1889 feature = "VNDetectedPoint",
1890 feature = "VNGeometry",
1891 feature = "VNTypes"
1892 ))]
1893 #[unsafe(method(recognizedPointForKey:error:_))]
1904 #[unsafe(method_family = none)]
1905 pub unsafe fn recognizedPointForKey_error(
1906 &self,
1907 point_key: &VNRecognizedPointKey,
1908 ) -> Result<Retained<VNRecognizedPoint>, Retained<NSError>>;
1909
1910 #[cfg(all(
1911 feature = "VNDetectedPoint",
1912 feature = "VNGeometry",
1913 feature = "VNTypes"
1914 ))]
1915 #[unsafe(method(recognizedPointsForGroupKey:error:_))]
1927 #[unsafe(method_family = none)]
1928 pub unsafe fn recognizedPointsForGroupKey_error(
1929 &self,
1930 group_key: &VNRecognizedPointGroupKey,
1931 ) -> Result<
1932 Retained<NSDictionary<VNRecognizedPointKey, VNRecognizedPoint>>,
1933 Retained<NSError>,
1934 >;
1935
1936 #[cfg(feature = "objc2-core-ml")]
1937 #[unsafe(method(keypointsMultiArrayAndReturnError:_))]
1949 #[unsafe(method_family = none)]
1950 pub unsafe fn keypointsMultiArrayAndReturnError(
1951 &self,
1952 ) -> Result<Retained<MLMultiArray>, Retained<NSError>>;
1953 );
1954}
1955
1956extern_class!(
1957 #[unsafe(super(VNDetectedObjectObservation, VNObservation, NSObject))]
1961 #[derive(Debug, PartialEq, Eq, Hash)]
1962 pub struct VNHumanObservation;
1963);
1964
1965extern_conformance!(
1966 unsafe impl NSCoding for VNHumanObservation {}
1967);
1968
1969extern_conformance!(
1970 unsafe impl NSCopying for VNHumanObservation {}
1971);
1972
1973unsafe impl CopyingHelper for VNHumanObservation {
1974 type Result = Self;
1975}
1976
1977extern_conformance!(
1978 unsafe impl NSObjectProtocol for VNHumanObservation {}
1979);
1980
1981extern_conformance!(
1982 unsafe impl NSSecureCoding for VNHumanObservation {}
1983);
1984
1985#[cfg(feature = "VNRequestRevisionProviding")]
1986extern_conformance!(
1987 unsafe impl VNRequestRevisionProviding for VNHumanObservation {}
1988);
1989
1990impl VNHumanObservation {
1991 extern_methods!(
1992 #[unsafe(method(upperBodyOnly))]
1994 #[unsafe(method_family = none)]
1995 pub unsafe fn upperBodyOnly(&self) -> bool;
1996 );
1997}
1998
1999impl VNHumanObservation {
2001 extern_methods!(
2002 #[cfg(feature = "objc2-core-foundation")]
2003 #[unsafe(method(observationWithBoundingBox:))]
2005 #[unsafe(method_family = none)]
2006 pub unsafe fn observationWithBoundingBox(bounding_box: CGRect) -> Retained<Self>;
2007
2008 #[cfg(feature = "objc2-core-foundation")]
2009 #[unsafe(method(observationWithRequestRevision:boundingBox:))]
2010 #[unsafe(method_family = none)]
2011 pub unsafe fn observationWithRequestRevision_boundingBox(
2012 request_revision: NSUInteger,
2013 bounding_box: CGRect,
2014 ) -> Retained<Self>;
2015 );
2016}
2017
2018impl VNHumanObservation {
2020 extern_methods!(
2021 #[unsafe(method(init))]
2022 #[unsafe(method_family = init)]
2023 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2024
2025 #[unsafe(method(new))]
2026 #[unsafe(method_family = new)]
2027 pub unsafe fn new() -> Retained<Self>;
2028 );
2029}
2030
2031extern_class!(
2032 #[unsafe(super(VNObservation, NSObject))]
2036 #[derive(Debug, PartialEq, Eq, Hash)]
2037 pub struct VNInstanceMaskObservation;
2038);
2039
2040extern_conformance!(
2041 unsafe impl NSCoding for VNInstanceMaskObservation {}
2042);
2043
2044extern_conformance!(
2045 unsafe impl NSCopying for VNInstanceMaskObservation {}
2046);
2047
2048unsafe impl CopyingHelper for VNInstanceMaskObservation {
2049 type Result = Self;
2050}
2051
2052extern_conformance!(
2053 unsafe impl NSObjectProtocol for VNInstanceMaskObservation {}
2054);
2055
2056extern_conformance!(
2057 unsafe impl NSSecureCoding for VNInstanceMaskObservation {}
2058);
2059
2060#[cfg(feature = "VNRequestRevisionProviding")]
2061extern_conformance!(
2062 unsafe impl VNRequestRevisionProviding for VNInstanceMaskObservation {}
2063);
2064
2065impl VNInstanceMaskObservation {
2066 extern_methods!(
2067 #[cfg(feature = "objc2-core-video")]
2068 #[unsafe(method(instanceMask))]
2071 #[unsafe(method_family = none)]
2072 pub unsafe fn instanceMask(&self) -> Retained<CVPixelBuffer>;
2073
2074 #[unsafe(method(allInstances))]
2076 #[unsafe(method_family = none)]
2077 pub unsafe fn allInstances(&self) -> Retained<NSIndexSet>;
2078 );
2079}
2080
2081impl VNInstanceMaskObservation {
2083 extern_methods!(
2084 #[unsafe(method(init))]
2085 #[unsafe(method_family = init)]
2086 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2087
2088 #[unsafe(method(new))]
2089 #[unsafe(method_family = new)]
2090 pub unsafe fn new() -> Retained<Self>;
2091 );
2092}
2093
2094extern_class!(
2095 #[unsafe(super(VNRecognizedPointsObservation, VNObservation, NSObject))]
2097 #[derive(Debug, PartialEq, Eq, Hash)]
2098 pub struct VNAnimalBodyPoseObservation;
2099);
2100
2101extern_conformance!(
2102 unsafe impl NSCoding for VNAnimalBodyPoseObservation {}
2103);
2104
2105extern_conformance!(
2106 unsafe impl NSCopying for VNAnimalBodyPoseObservation {}
2107);
2108
2109unsafe impl CopyingHelper for VNAnimalBodyPoseObservation {
2110 type Result = Self;
2111}
2112
2113extern_conformance!(
2114 unsafe impl NSObjectProtocol for VNAnimalBodyPoseObservation {}
2115);
2116
2117extern_conformance!(
2118 unsafe impl NSSecureCoding for VNAnimalBodyPoseObservation {}
2119);
2120
2121#[cfg(feature = "VNRequestRevisionProviding")]
2122extern_conformance!(
2123 unsafe impl VNRequestRevisionProviding for VNAnimalBodyPoseObservation {}
2124);
2125
2126impl VNAnimalBodyPoseObservation {
2127 extern_methods!(
2128 #[cfg(feature = "VNTypes")]
2129 #[unsafe(method(availableJointNames))]
2131 #[unsafe(method_family = none)]
2132 pub unsafe fn availableJointNames(
2133 &self,
2134 ) -> Retained<NSArray<VNAnimalBodyPoseObservationJointName>>;
2135
2136 #[cfg(feature = "VNTypes")]
2137 #[unsafe(method(availableJointGroupNames))]
2139 #[unsafe(method_family = none)]
2140 pub unsafe fn availableJointGroupNames(
2141 &self,
2142 ) -> Retained<NSArray<VNAnimalBodyPoseObservationJointsGroupName>>;
2143
2144 #[cfg(all(
2145 feature = "VNDetectedPoint",
2146 feature = "VNGeometry",
2147 feature = "VNTypes"
2148 ))]
2149 #[unsafe(method(recognizedPointForJointName:error:_))]
2158 #[unsafe(method_family = none)]
2159 pub unsafe fn recognizedPointForJointName_error(
2160 &self,
2161 joint_name: &VNAnimalBodyPoseObservationJointName,
2162 ) -> Result<Retained<VNRecognizedPoint>, Retained<NSError>>;
2163
2164 #[cfg(all(
2165 feature = "VNDetectedPoint",
2166 feature = "VNGeometry",
2167 feature = "VNTypes"
2168 ))]
2169 #[unsafe(method(recognizedPointsForJointsGroupName:error:_))]
2181 #[unsafe(method_family = none)]
2182 pub unsafe fn recognizedPointsForJointsGroupName_error(
2183 &self,
2184 joints_group_name: &VNAnimalBodyPoseObservationJointsGroupName,
2185 ) -> Result<
2186 Retained<NSDictionary<VNAnimalBodyPoseObservationJointName, VNRecognizedPoint>>,
2187 Retained<NSError>,
2188 >;
2189 );
2190}
2191
2192impl VNAnimalBodyPoseObservation {
2194 extern_methods!(
2195 #[unsafe(method(new))]
2196 #[unsafe(method_family = new)]
2197 pub unsafe fn new() -> Retained<Self>;
2198
2199 #[unsafe(method(init))]
2200 #[unsafe(method_family = init)]
2201 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2202 );
2203}
2204
2205extern "C" {
2206 #[cfg(feature = "VNTypes")]
2208 pub static VNRecognizedPoint3DGroupKeyAll: &'static VNRecognizedPointGroupKey;
2209}
2210
2211extern_class!(
2212 #[unsafe(super(VNObservation, NSObject))]
2218 #[derive(Debug, PartialEq, Eq, Hash)]
2219 pub struct VNRecognizedPoints3DObservation;
2220);
2221
2222extern_conformance!(
2223 unsafe impl NSCoding for VNRecognizedPoints3DObservation {}
2224);
2225
2226extern_conformance!(
2227 unsafe impl NSCopying for VNRecognizedPoints3DObservation {}
2228);
2229
2230unsafe impl CopyingHelper for VNRecognizedPoints3DObservation {
2231 type Result = Self;
2232}
2233
2234extern_conformance!(
2235 unsafe impl NSObjectProtocol for VNRecognizedPoints3DObservation {}
2236);
2237
2238extern_conformance!(
2239 unsafe impl NSSecureCoding for VNRecognizedPoints3DObservation {}
2240);
2241
2242#[cfg(feature = "VNRequestRevisionProviding")]
2243extern_conformance!(
2244 unsafe impl VNRequestRevisionProviding for VNRecognizedPoints3DObservation {}
2245);
2246
2247impl VNRecognizedPoints3DObservation {
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 #[cfg(feature = "VNTypes")]
2258 #[unsafe(method(availableKeys))]
2260 #[unsafe(method_family = none)]
2261 pub unsafe fn availableKeys(&self) -> Retained<NSArray<VNRecognizedPointKey>>;
2262
2263 #[cfg(feature = "VNTypes")]
2264 #[unsafe(method(availableGroupKeys))]
2266 #[unsafe(method_family = none)]
2267 pub unsafe fn availableGroupKeys(&self) -> Retained<NSArray<VNRecognizedPointGroupKey>>;
2268
2269 #[cfg(all(
2270 feature = "VNGeometry",
2271 feature = "VNRecognizedPoint3D",
2272 feature = "VNTypes"
2273 ))]
2274 #[unsafe(method(recognizedPointForKey:error:_))]
2282 #[unsafe(method_family = none)]
2283 pub unsafe fn recognizedPointForKey_error(
2284 &self,
2285 point_key: &VNRecognizedPointKey,
2286 ) -> Result<Retained<VNRecognizedPoint3D>, Retained<NSError>>;
2287
2288 #[cfg(all(
2289 feature = "VNGeometry",
2290 feature = "VNRecognizedPoint3D",
2291 feature = "VNTypes"
2292 ))]
2293 #[unsafe(method(recognizedPointsForGroupKey:error:_))]
2303 #[unsafe(method_family = none)]
2304 pub unsafe fn recognizedPointsForGroupKey_error(
2305 &self,
2306 group_key: &VNRecognizedPointGroupKey,
2307 ) -> Result<
2308 Retained<NSDictionary<VNRecognizedPointKey, VNRecognizedPoint3D>>,
2309 Retained<NSError>,
2310 >;
2311 );
2312}
2313
2314#[repr(transparent)]
2323#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2324pub struct VNHumanBodyPose3DObservationHeightEstimation(pub NSInteger);
2325impl VNHumanBodyPose3DObservationHeightEstimation {
2326 #[doc(alias = "VNHumanBodyPose3DObservationHeightEstimationReference")]
2327 pub const Reference: Self = Self(0);
2328 #[doc(alias = "VNHumanBodyPose3DObservationHeightEstimationMeasured")]
2329 pub const Measured: Self = Self(1);
2330}
2331
2332unsafe impl Encode for VNHumanBodyPose3DObservationHeightEstimation {
2333 const ENCODING: Encoding = NSInteger::ENCODING;
2334}
2335
2336unsafe impl RefEncode for VNHumanBodyPose3DObservationHeightEstimation {
2337 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2338}
2339
2340extern_class!(
2341 #[unsafe(super(VNRecognizedPoints3DObservation, VNObservation, NSObject))]
2343 #[derive(Debug, PartialEq, Eq, Hash)]
2344 pub struct VNHumanBodyPose3DObservation;
2345);
2346
2347extern_conformance!(
2348 unsafe impl NSCoding for VNHumanBodyPose3DObservation {}
2349);
2350
2351extern_conformance!(
2352 unsafe impl NSCopying for VNHumanBodyPose3DObservation {}
2353);
2354
2355unsafe impl CopyingHelper for VNHumanBodyPose3DObservation {
2356 type Result = Self;
2357}
2358
2359extern_conformance!(
2360 unsafe impl NSObjectProtocol for VNHumanBodyPose3DObservation {}
2361);
2362
2363extern_conformance!(
2364 unsafe impl NSSecureCoding for VNHumanBodyPose3DObservation {}
2365);
2366
2367#[cfg(feature = "VNRequestRevisionProviding")]
2368extern_conformance!(
2369 unsafe impl VNRequestRevisionProviding for VNHumanBodyPose3DObservation {}
2370);
2371
2372impl VNHumanBodyPose3DObservation {
2373 extern_methods!(
2374 #[unsafe(method(heightEstimation))]
2377 #[unsafe(method_family = none)]
2378 pub unsafe fn heightEstimation(&self) -> VNHumanBodyPose3DObservationHeightEstimation;
2379
2380 #[cfg(feature = "VNTypes")]
2381 #[unsafe(method(availableJointsGroupNames))]
2383 #[unsafe(method_family = none)]
2384 pub unsafe fn availableJointsGroupNames(
2385 &self,
2386 ) -> Retained<NSArray<VNHumanBodyPose3DObservationJointsGroupName>>;
2387
2388 #[cfg(feature = "VNTypes")]
2389 #[unsafe(method(availableJointNames))]
2391 #[unsafe(method_family = none)]
2392 pub unsafe fn availableJointNames(
2393 &self,
2394 ) -> Retained<NSArray<VNHumanBodyPose3DObservationJointName>>;
2395
2396 #[unsafe(method(bodyHeight))]
2400 #[unsafe(method_family = none)]
2401 pub unsafe fn bodyHeight(&self) -> c_float;
2402
2403 #[cfg(all(
2404 feature = "VNGeometry",
2405 feature = "VNHumanBodyRecognizedPoint3D",
2406 feature = "VNRecognizedPoint3D",
2407 feature = "VNTypes"
2408 ))]
2409 #[unsafe(method(recognizedPointsForJointsGroupName:error:_))]
2419 #[unsafe(method_family = none)]
2420 pub unsafe fn recognizedPointsForJointsGroupName_error(
2421 &self,
2422 joints_group_name: &VNHumanBodyPose3DObservationJointsGroupName,
2423 ) -> Result<
2424 Retained<
2425 NSDictionary<VNHumanBodyPose3DObservationJointName, VNHumanBodyRecognizedPoint3D>,
2426 >,
2427 Retained<NSError>,
2428 >;
2429
2430 #[cfg(all(
2431 feature = "VNGeometry",
2432 feature = "VNHumanBodyRecognizedPoint3D",
2433 feature = "VNRecognizedPoint3D",
2434 feature = "VNTypes"
2435 ))]
2436 #[unsafe(method(recognizedPointForJointName:error:_))]
2447 #[unsafe(method_family = none)]
2448 pub unsafe fn recognizedPointForJointName_error(
2449 &self,
2450 joint_name: &VNHumanBodyPose3DObservationJointName,
2451 ) -> Result<Retained<VNHumanBodyRecognizedPoint3D>, Retained<NSError>>;
2452
2453 #[cfg(all(feature = "VNGeometry", feature = "VNTypes"))]
2454 #[unsafe(method(pointInImageForJointName:error:_))]
2460 #[unsafe(method_family = none)]
2461 pub unsafe fn pointInImageForJointName_error(
2462 &self,
2463 joint_name: &VNHumanBodyPose3DObservationJointName,
2464 ) -> Result<Retained<VNPoint>, Retained<NSError>>;
2465
2466 #[cfg(feature = "VNTypes")]
2467 #[unsafe(method(parentJointNameForJointName:))]
2473 #[unsafe(method_family = none)]
2474 pub unsafe fn parentJointNameForJointName(
2475 &self,
2476 joint_name: &VNHumanBodyPose3DObservationJointName,
2477 ) -> Option<Retained<VNHumanBodyPose3DObservationJointName>>;
2478 );
2479}
2480
2481impl VNHumanBodyPose3DObservation {
2483 extern_methods!(
2484 #[unsafe(method(new))]
2485 #[unsafe(method_family = new)]
2486 pub unsafe fn new() -> Retained<Self>;
2487
2488 #[unsafe(method(init))]
2489 #[unsafe(method_family = init)]
2490 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2491 );
2492}
2493
2494extern_class!(
2495 #[unsafe(super(VNObservation, NSObject))]
2499 #[derive(Debug, PartialEq, Eq, Hash)]
2500 pub struct VNImageAestheticsScoresObservation;
2501);
2502
2503extern_conformance!(
2504 unsafe impl NSCoding for VNImageAestheticsScoresObservation {}
2505);
2506
2507extern_conformance!(
2508 unsafe impl NSCopying for VNImageAestheticsScoresObservation {}
2509);
2510
2511unsafe impl CopyingHelper for VNImageAestheticsScoresObservation {
2512 type Result = Self;
2513}
2514
2515extern_conformance!(
2516 unsafe impl NSObjectProtocol for VNImageAestheticsScoresObservation {}
2517);
2518
2519extern_conformance!(
2520 unsafe impl NSSecureCoding for VNImageAestheticsScoresObservation {}
2521);
2522
2523#[cfg(feature = "VNRequestRevisionProviding")]
2524extern_conformance!(
2525 unsafe impl VNRequestRevisionProviding for VNImageAestheticsScoresObservation {}
2526);
2527
2528impl VNImageAestheticsScoresObservation {
2529 extern_methods!(
2530 #[unsafe(method(init))]
2531 #[unsafe(method_family = init)]
2532 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2533
2534 #[unsafe(method(isUtility))]
2536 #[unsafe(method_family = none)]
2537 pub unsafe fn isUtility(&self) -> bool;
2538
2539 #[unsafe(method(overallScore))]
2541 #[unsafe(method_family = none)]
2542 pub unsafe fn overallScore(&self) -> c_float;
2543 );
2544}
2545
2546impl VNImageAestheticsScoresObservation {
2548 extern_methods!(
2549 #[unsafe(method(new))]
2550 #[unsafe(method_family = new)]
2551 pub unsafe fn new() -> Retained<Self>;
2552 );
2553}