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")]
26unsafe impl NSCopying for VNDetectFaceCaptureQualityRequest {}
27
28#[cfg(feature = "VNRequest")]
29unsafe impl CopyingHelper for VNDetectFaceCaptureQualityRequest {
30    type Result = Self;
31}
32
33#[cfg(feature = "VNRequest")]
34unsafe impl NSObjectProtocol for VNDetectFaceCaptureQualityRequest {}
35
36#[cfg(all(feature = "VNFaceObservationAccepting", feature = "VNRequest"))]
37unsafe impl VNFaceObservationAccepting for VNDetectFaceCaptureQualityRequest {}
38
39#[cfg(feature = "VNRequest")]
40impl VNDetectFaceCaptureQualityRequest {
41    extern_methods!(
42        #[cfg(feature = "VNObservation")]
43        /// VNFaceObservation with populated faceCaptureQuality property results.
44        #[unsafe(method(results))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNFaceObservation>>>;
47    );
48}
49
50/// Methods declared on superclass `VNRequest`.
51#[cfg(feature = "VNRequest")]
52impl VNDetectFaceCaptureQualityRequest {
53    extern_methods!(
54        /// Creates a new VNRequest with no completion handler.
55        #[unsafe(method(init))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
58
59        #[cfg(feature = "block2")]
60        /// Creates a new VNRequest with an optional completion handler.
61        ///
62        ///
63        /// 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.
64        #[unsafe(method(initWithCompletionHandler:))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn initWithCompletionHandler(
67            this: Allocated<Self>,
68            completion_handler: VNRequestCompletionHandler,
69        ) -> Retained<Self>;
70    );
71}
72
73/// Methods declared on superclass `NSObject`.
74#[cfg(feature = "VNRequest")]
75impl VNDetectFaceCaptureQualityRequest {
76    extern_methods!(
77        #[unsafe(method(new))]
78        #[unsafe(method_family = new)]
79        pub unsafe fn new() -> Retained<Self>;
80    );
81}
82
83/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision1?language=objc)
84pub static VNDetectFaceCaptureQualityRequestRevision1: NSUInteger = 1;
85
86/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision2?language=objc)
87pub static VNDetectFaceCaptureQualityRequestRevision2: NSUInteger = 2;
88
89/// 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.
90///
91/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectfacecapturequalityrequestrevision3?language=objc)
92pub static VNDetectFaceCaptureQualityRequestRevision3: NSUInteger = 3;