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