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")]
24unsafe impl NSCopying for VNGenerateImageFeaturePrintRequest {}
25
26#[cfg(feature = "VNRequest")]
27unsafe impl CopyingHelper for VNGenerateImageFeaturePrintRequest {
28    type Result = Self;
29}
30
31#[cfg(feature = "VNRequest")]
32unsafe impl NSObjectProtocol for VNGenerateImageFeaturePrintRequest {}
33
34#[cfg(feature = "VNRequest")]
35impl VNGenerateImageFeaturePrintRequest {
36    extern_methods!(
37        #[cfg(feature = "VNTypes")]
38        /// Determine what type of croping and scaling action should be applied to the image before generating the feature print.
39        ///
40        ///
41        /// The default value for this property is `VNImageCropAndScaleOptionScaleFill`.
42        #[unsafe(method(imageCropAndScaleOption))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn imageCropAndScaleOption(&self) -> VNImageCropAndScaleOption;
45
46        #[cfg(feature = "VNTypes")]
47        /// Setter for [`imageCropAndScaleOption`][Self::imageCropAndScaleOption].
48        #[unsafe(method(setImageCropAndScaleOption:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn setImageCropAndScaleOption(
51            &self,
52            image_crop_and_scale_option: VNImageCropAndScaleOption,
53        );
54
55        #[cfg(feature = "VNObservation")]
56        /// `VNFeaturePrintObservation` results.
57        #[unsafe(method(results))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNFeaturePrintObservation>>>;
60    );
61}
62
63/// Methods declared on superclass `VNRequest`.
64#[cfg(feature = "VNRequest")]
65impl VNGenerateImageFeaturePrintRequest {
66    extern_methods!(
67        /// Creates a new VNRequest with no completion handler.
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72        #[cfg(feature = "block2")]
73        /// Creates a new VNRequest with an optional completion handler.
74        ///
75        ///
76        /// 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.
77        #[unsafe(method(initWithCompletionHandler:))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn initWithCompletionHandler(
80            this: Allocated<Self>,
81            completion_handler: VNRequestCompletionHandler,
82        ) -> Retained<Self>;
83    );
84}
85
86/// Methods declared on superclass `NSObject`.
87#[cfg(feature = "VNRequest")]
88impl VNGenerateImageFeaturePrintRequest {
89    extern_methods!(
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}
95
96/// The feature print produced by the `VNClassifyImageRequestRevision1` classifier.
97///
98/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequestrevision1?language=objc)
99pub static VNGenerateImageFeaturePrintRequestRevision1: NSUInteger = 1;
100
101/// The feature print produced by the `VNClassifyImageRequestRevision2` classifier.
102///
103/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateimagefeatureprintrequestrevision2?language=objc)
104pub static VNGenerateImageFeaturePrintRequestRevision2: NSUInteger = 2;