objc2_vision/generated/
VNDetectDocumentSegmentationRequest.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    /// Performs document detection and segmentation in an image.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectdocumentsegmentationrequest?language=objc)
13    #[unsafe(super(VNImageBasedRequest, VNRequest, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "VNRequest")]
16    pub struct VNDetectDocumentSegmentationRequest;
17);
18
19#[cfg(feature = "VNRequest")]
20unsafe impl NSCopying for VNDetectDocumentSegmentationRequest {}
21
22#[cfg(feature = "VNRequest")]
23unsafe impl CopyingHelper for VNDetectDocumentSegmentationRequest {
24    type Result = Self;
25}
26
27#[cfg(feature = "VNRequest")]
28unsafe impl NSObjectProtocol for VNDetectDocumentSegmentationRequest {}
29
30#[cfg(feature = "VNRequest")]
31impl VNDetectDocumentSegmentationRequest {
32    extern_methods!(
33        #[cfg(feature = "VNObservation")]
34        /// VNRectangleObservation results.
35        #[unsafe(method(results))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn results(&self) -> Option<Retained<NSArray<VNRectangleObservation>>>;
38    );
39}
40
41/// Methods declared on superclass `VNRequest`.
42#[cfg(feature = "VNRequest")]
43impl VNDetectDocumentSegmentationRequest {
44    extern_methods!(
45        /// Creates a new VNRequest with no completion handler.
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[cfg(feature = "block2")]
51        /// Creates a new VNRequest with an optional completion handler.
52        ///
53        ///
54        /// 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.
55        #[unsafe(method(initWithCompletionHandler:))]
56        #[unsafe(method_family = init)]
57        pub unsafe fn initWithCompletionHandler(
58            this: Allocated<Self>,
59            completion_handler: VNRequestCompletionHandler,
60        ) -> Retained<Self>;
61    );
62}
63
64/// Methods declared on superclass `NSObject`.
65#[cfg(feature = "VNRequest")]
66impl VNDetectDocumentSegmentationRequest {
67    extern_methods!(
68        #[unsafe(method(new))]
69        #[unsafe(method_family = new)]
70        pub unsafe fn new() -> Retained<Self>;
71    );
72}
73
74/// [Apple's documentation](https://developer.apple.com/documentation/vision/vndetectdocumentsegmentationrequestrevision1?language=objc)
75pub static VNDetectDocumentSegmentationRequestRevision1: NSUInteger = 1;