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")]
21extern_conformance!(
22    unsafe impl NSCopying for VNCalculateImageAestheticsScoresRequest {}
23);
24
25#[cfg(feature = "VNRequest")]
26unsafe impl CopyingHelper for VNCalculateImageAestheticsScoresRequest {
27    type Result = Self;
28}
29
30#[cfg(feature = "VNRequest")]
31extern_conformance!(
32    unsafe impl NSObjectProtocol for VNCalculateImageAestheticsScoresRequest {}
33);
34
35#[cfg(feature = "VNRequest")]
36impl VNCalculateImageAestheticsScoresRequest {
37    extern_methods!(
38        #[cfg(feature = "VNObservation")]
39        /// VNObservation results.
40        #[unsafe(method(results))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn results(
43            &self,
44        ) -> Option<Retained<NSArray<VNImageAestheticsScoresObservation>>>;
45    );
46}
47
48/// Methods declared on superclass `VNRequest`.
49#[cfg(feature = "VNRequest")]
50impl VNCalculateImageAestheticsScoresRequest {
51    extern_methods!(
52        /// Creates a new VNRequest with no completion handler.
53        #[unsafe(method(init))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
56
57        #[cfg(feature = "block2")]
58        /// Creates a new VNRequest with an optional completion handler.
59        ///
60        ///
61        /// 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.
62        ///
63        /// # Safety
64        ///
65        /// `completion_handler` must be a valid pointer or null.
66        #[unsafe(method(initWithCompletionHandler:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithCompletionHandler(
69            this: Allocated<Self>,
70            completion_handler: VNRequestCompletionHandler,
71        ) -> Retained<Self>;
72    );
73}
74
75/// Methods declared on superclass `NSObject`.
76#[cfg(feature = "VNRequest")]
77impl VNCalculateImageAestheticsScoresRequest {
78    extern_methods!(
79        #[unsafe(method(new))]
80        #[unsafe(method_family = new)]
81        pub unsafe fn new() -> Retained<Self>;
82    );
83}
84
85/// [Apple's documentation](https://developer.apple.com/documentation/vision/vncalculateimageaestheticsscoresrequestrevision1?language=objc)
86pub static VNCalculateImageAestheticsScoresRequestRevision1: NSUInteger = 1;