objc2_core_ml/generated/
MLModelStructureProgramOperation.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    /// A class representing an Operation in a Program.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlmodelstructureprogramoperation?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MLModelStructureProgramOperation;
16);
17
18unsafe impl Send for MLModelStructureProgramOperation {}
19
20unsafe impl Sync for MLModelStructureProgramOperation {}
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for MLModelStructureProgramOperation {}
24);
25
26impl MLModelStructureProgramOperation {
27    extern_methods!(
28        #[unsafe(method(init))]
29        #[unsafe(method_family = init)]
30        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32        #[unsafe(method(new))]
33        #[unsafe(method_family = new)]
34        pub unsafe fn new() -> Retained<Self>;
35
36        /// The name of the operator, e.g., "conv", "pool", "softmax", etc.
37        ///
38        /// This property is not atomic.
39        ///
40        /// # Safety
41        ///
42        /// This might not be thread-safe.
43        #[unsafe(method(operatorName))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn operatorName(&self) -> Retained<NSString>;
46
47        #[cfg(feature = "MLModelStructureProgramArgument")]
48        /// The arguments to the Operation.
49        ///
50        /// This property is not atomic.
51        ///
52        /// # Safety
53        ///
54        /// This might not be thread-safe.
55        #[unsafe(method(inputs))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn inputs(
58            &self,
59        ) -> Retained<NSDictionary<NSString, MLModelStructureProgramArgument>>;
60
61        #[cfg(feature = "MLModelStructureProgramNamedValueType")]
62        /// The outputs of the Operation.
63        ///
64        /// This property is not atomic.
65        ///
66        /// # Safety
67        ///
68        /// This might not be thread-safe.
69        #[unsafe(method(outputs))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn outputs(&self) -> Retained<NSArray<MLModelStructureProgramNamedValueType>>;
72
73        #[cfg(feature = "MLModelStructureProgramBlock")]
74        /// Nested blocks for loops and conditionals, e.g., a conditional block will have two entries here.
75        ///
76        /// This property is not atomic.
77        ///
78        /// # Safety
79        ///
80        /// This might not be thread-safe.
81        #[unsafe(method(blocks))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn blocks(&self) -> Retained<NSArray<MLModelStructureProgramBlock>>;
84    );
85}