objc2_vision/generated/
VNDetectFaceCaptureQualityRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// A request that will produce or update a VNFaceObservation's property faceCaptureQuality with a float value.
11    /// faceCaptureQuality is a float (wrapped by a NSNumber) that represents the capture quality of a given face in a photo.
12    /// The float will be a value between 0 and 1, with 1 being the highest face capture quality and 0 being the lowest.
13    /// If the request fails or the face observation has never been processed, the property faceCaptureQuality will be nil.
14    ///
15    ///
16    /// This request will generate VNFaceObservation objects with the face quality variable populated with information .
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequest?language=objc)
19    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    #[cfg(feature = "VNRequest")]
22    pub struct VNDetectFaceCaptureQualityRequest;
23);
24
25#[cfg(feature = "VNRequest")]
26extern_conformance!(
27    unsafe impl NSCopying for VNDetectFaceCaptureQualityRequest {}
28);
29
30#[cfg(feature = "VNRequest")]
31unsafe impl CopyingHelper for VNDetectFaceCaptureQualityRequest {
32    type Result = Self;
33}
34
35#[cfg(feature = "VNRequest")]
36extern_conformance!(
37    unsafe impl NSObjectProtocol for VNDetectFaceCaptureQualityRequest {}
38);
39
40#[cfg(all(feature = "VNFaceObservationAccepting", feature = "VNRequest"))]
41extern_conformance!(
42    unsafe impl VNFaceObservationAccepting for VNDetectFaceCaptureQualityRequest {}
43);
44
45#[cfg(feature = "VNRequest")]
46impl VNDetectFaceCaptureQualityRequest {
47    extern_methods!(
48        #[cfg(feature = "VNObservation")]
49        /// VNFaceObservation with populated faceCaptureQuality property results.
50        #[unsafe(method(results))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNFaceObservation>>>;
53    );
54}
55
56/// Methods declared on superclass `VNRequest`.
57#[cfg(feature = "VNRequest")]
58impl VNDetectFaceCaptureQualityRequest {
59    extern_methods!(
60        /// Creates a new VNRequest with no completion handler.
61        #[unsafe(method(init))]
62        #[unsafe(method_family = init)]
63        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
64
65        #[cfg(feature = "block2")]
66        /// Creates a new VNRequest with an optional completion handler.
67        ///
68        ///
69        /// Parameter `completionHandler`: The block to be invoked after the request has completed its processing. The completion handler gets executed on the same dispatch queue as the request being executed.
70        #[unsafe(method(initWithCompletionHandler:))]
71        #[unsafe(method_family = init)]
72        pub unsafe fn initWithCompletionHandler(
73            this: Allocated<Self>,
74            completion_handler: VNRequestCompletionHandler,
75        ) -> Retained<Self>;
76    );
77}
78
79/// Methods declared on superclass `NSObject`.
80#[cfg(feature = "VNRequest")]
81impl VNDetectFaceCaptureQualityRequest {
82    extern_methods!(
83        #[unsafe(method(new))]
84        #[unsafe(method_family = new)]
85        pub unsafe fn new() -> Retained<Self>;
86    );
87}
88
89/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision1?language=objc)
90pub static VNDetectFaceCaptureQualityRequestRevision1: NSUInteger = 1;
91
92/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision2?language=objc)
93pub static VNDetectFaceCaptureQualityRequestRevision2: NSUInteger = 2;
94
95/// The revision shows better correlation with human judgement on a larger and more diverse dataset. It is also more stable with respect to minor image variations.
96///
97/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision3?language=objc)
98pub static VNDetectFaceCaptureQualityRequestRevision3: NSUInteger = 3;