objc2_core_ml/generated/
MLModelStructureProgramBinding.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 a binding in the Program
11    ///
12    /// A Binding is either a previously defined name of a variable or a constant value in the Program.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/coreml/mlmodelstructureprogrambinding?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct MLModelStructureProgramBinding;
18);
19
20unsafe impl Send for MLModelStructureProgramBinding {}
21
22unsafe impl Sync for MLModelStructureProgramBinding {}
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for MLModelStructureProgramBinding {}
26);
27
28impl MLModelStructureProgramBinding {
29    extern_methods!(
30        #[unsafe(method(init))]
31        #[unsafe(method_family = init)]
32        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
33
34        #[unsafe(method(new))]
35        #[unsafe(method_family = new)]
36        pub unsafe fn new() -> Retained<Self>;
37
38        /// The name of the variable in the Program.
39        ///
40        /// This property is not atomic.
41        ///
42        /// # Safety
43        ///
44        /// This might not be thread-safe.
45        #[unsafe(method(name))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn name(&self) -> Option<Retained<NSString>>;
48
49        #[cfg(feature = "MLModelStructureProgramValue")]
50        /// The compile time constant value in the Program.
51        ///
52        /// This property is not atomic.
53        ///
54        /// # Safety
55        ///
56        /// This might not be thread-safe.
57        #[unsafe(method(value))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn value(&self) -> Option<Retained<MLModelStructureProgramValue>>;
60    );
61}