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        #[unsafe(method(initWithCompletionHandler:))]
82        #[unsafe(method_family = init)]
83        pub unsafe fn initWithCompletionHandler(
84            this: Allocated<Self>,
85            completion_handler: VNRequestCompletionHandler,
86        ) -> Retained<Self>;
87    );
88}
89
90/// Methods declared on superclass `NSObject`.
91#[cfg(feature = "VNRequest")]
92impl VNGenerateImageFeaturePrintRequest {
93    extern_methods!(
94        #[unsafe(method(new))]
95        #[unsafe(method_family = new)]
96        pub unsafe fn new() -> Retained<Self>;
97    );
98}
99
100/// The feature print produced by the `VNClassifyImageRequestRevision1` classifier.
101///
102/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequestrevision1?language=objc)
103pub static VNGenerateImageFeaturePrintRequestRevision1: NSUInteger = 1;
104
105/// The feature print produced by the `VNClassifyImageRequestRevision2` classifier.
106///
107/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequestrevision2?language=objc)
108pub static VNGenerateImageFeaturePrintRequestRevision2: NSUInteger = 2;