objc2_vision/generated/
VNGenerateObjectnessBasedSaliencyImageRequest.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    /// Generates an image that identifies which part(s) of a given image are most likely to be objects (i.e. something that a human is likely to see as an object).
11    /// The resulting observation, VNSaliencyImageObservation, encodes this data as a heat map which can be used highlight regions of interest.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateobjectnessbasedsaliencyimagerequest?language=objc)
14    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "VNRequest")]
17    pub struct VNGenerateObjectnessBasedSaliencyImageRequest;
18);
19
20#[cfg(feature = "VNRequest")]
21unsafe impl NSCopying for VNGenerateObjectnessBasedSaliencyImageRequest {}
22
23#[cfg(feature = "VNRequest")]
24unsafe impl CopyingHelper for VNGenerateObjectnessBasedSaliencyImageRequest {
25    type Result = Self;
26}
27
28#[cfg(feature = "VNRequest")]
29unsafe impl NSObjectProtocol for VNGenerateObjectnessBasedSaliencyImageRequest {}
30
31#[cfg(feature = "VNRequest")]
32impl VNGenerateObjectnessBasedSaliencyImageRequest {
33    extern_methods!(
34        #[cfg(feature = "VNObservation")]
35        /// VNSaliencyImageObservation results.
36        #[unsafe(method(results))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNSaliencyImageObservation>>>;
39    );
40}
41
42/// Methods declared on superclass `VNRequest`.
43#[cfg(feature = "VNRequest")]
44impl VNGenerateObjectnessBasedSaliencyImageRequest {
45    extern_methods!(
46        /// Creates a new VNRequest with no completion handler.
47        #[unsafe(method(init))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51        #[cfg(feature = "block2")]
52        /// Creates a new VNRequest with an optional completion handler.
53        ///
54        ///
55        /// 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.
56        #[unsafe(method(initWithCompletionHandler:))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn initWithCompletionHandler(
59            this: Allocated<Self>,
60            completion_handler: VNRequestCompletionHandler,
61        ) -> Retained<Self>;
62    );
63}
64
65/// Methods declared on superclass `NSObject`.
66#[cfg(feature = "VNRequest")]
67impl VNGenerateObjectnessBasedSaliencyImageRequest {
68    extern_methods!(
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub unsafe fn new() -> Retained<Self>;
72    );
73}
74
75/// [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateobjectnessbasedsaliencyimagerequestrevision1?language=objc)
76pub static VNGenerateObjectnessBasedSaliencyImageRequestRevision1: NSUInteger = 1;
77
78/// Improved accuracy, reduced latency and memory utilization.
79///
80/// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vngenerateobjectnessbasedsaliencyimagerequestrevision2?language=objc)
81pub static VNGenerateObjectnessBasedSaliencyImageRequestRevision2: NSUInteger = 2;