objc2_vision/generated/
VNGenerateImageFeaturePrintRequest.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// A request for generating a feature print of an image.
12    ///
13    ///
14    /// This request will produce a `VNFeaturePrintObservation` object.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequest?language=objc)
17    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(feature = "VNRequest")]
20    pub struct VNGenerateImageFeaturePrintRequest;
21);
22
23#[cfg(feature = "VNRequest")]
24extern_conformance!(
25    unsafe impl NSCopying for VNGenerateImageFeaturePrintRequest {}
26);
27
28#[cfg(feature = "VNRequest")]
29unsafe impl CopyingHelper for VNGenerateImageFeaturePrintRequest {
30    type Result = Self;
31}
32
33#[cfg(feature = "VNRequest")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for VNGenerateImageFeaturePrintRequest {}
36);
37
38#[cfg(feature = "VNRequest")]
39impl VNGenerateImageFeaturePrintRequest {
40    extern_methods!(
41        #[cfg(feature = "VNTypes")]
42        /// Determine what type of croping and scaling action should be applied to the image before generating the feature print.
43        ///
44        ///
45        /// The default value for this property is `VNImageCropAndScaleOptionScaleFill`.
46        #[unsafe(method(imageCropAndScaleOption))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn imageCropAndScaleOption(&self) -> VNImageCropAndScaleOption;
49
50        #[cfg(feature = "VNTypes")]
51        /// Setter for [`imageCropAndScaleOption`][Self::imageCropAndScaleOption].
52        #[unsafe(method(setImageCropAndScaleOption:))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn setImageCropAndScaleOption(
55            &self,
56            image_crop_and_scale_option: VNImageCropAndScaleOption,
57        );
58
59        #[cfg(feature = "VNObservation")]
60        /// `VNFeaturePrintObservation` results.
61        #[unsafe(method(results))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNFeaturePrintObservation>>>;
64    );
65}
66
67/// Methods declared on superclass `VNRequest`.
68#[cfg(feature = "VNRequest")]
69impl VNGenerateImageFeaturePrintRequest {
70    extern_methods!(
71        /// Creates a new VNRequest with no completion handler.
72        #[unsafe(method(init))]
73        #[unsafe(method_family = init)]
74        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
75
76        #[cfg(feature = "block2")]
77        /// Creates a new VNRequest with an optional completion handler.
78        ///
79        ///
80        /// 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.
81        ///
82        /// # Safety
83        ///
84        /// `completion_handler` must be a valid pointer or null.
85        #[unsafe(method(initWithCompletionHandler:))]
86        #[unsafe(method_family = init)]
87        pub unsafe fn initWithCompletionHandler(
88            this: Allocated<Self>,
89            completion_handler: VNRequestCompletionHandler,
90        ) -> Retained<Self>;
91    );
92}
93
94/// Methods declared on superclass `NSObject`.
95#[cfg(feature = "VNRequest")]
96impl VNGenerateImageFeaturePrintRequest {
97    extern_methods!(
98        #[unsafe(method(new))]
99        #[unsafe(method_family = new)]
100        pub unsafe fn new() -> Retained<Self>;
101    );
102}
103
104/// The feature print produced by the `VNClassifyImageRequestRevision1` classifier.
105///
106/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequestrevision1?language=objc)
107pub static VNGenerateImageFeaturePrintRequestRevision1: NSUInteger = 1;
108
109/// The feature print produced by the `VNClassifyImageRequestRevision2` classifier.
110///
111/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequestrevision2?language=objc)
112pub static VNGenerateImageFeaturePrintRequestRevision2: NSUInteger = 2;