objc2_core_ml/generated/
MLFeatureDescription.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 pub struct MLFeatureDescription;
16);
17
18extern_conformance!(
19 unsafe impl NSCoding for MLFeatureDescription {}
20);
21
22extern_conformance!(
23 unsafe impl NSCopying for MLFeatureDescription {}
24);
25
26unsafe impl CopyingHelper for MLFeatureDescription {
27 type Result = Self;
28}
29
30extern_conformance!(
31 unsafe impl NSObjectProtocol for MLFeatureDescription {}
32);
33
34extern_conformance!(
35 unsafe impl NSSecureCoding for MLFeatureDescription {}
36);
37
38impl MLFeatureDescription {
39 extern_methods!(
40 #[unsafe(method(name))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn name(&self) -> Retained<NSString>;
44
45 #[cfg(feature = "MLFeatureType")]
46 #[unsafe(method(type))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn r#type(&self) -> MLFeatureType;
50
51 #[unsafe(method(isOptional))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn isOptional(&self) -> bool;
55
56 #[cfg(feature = "MLFeatureValue")]
57 #[unsafe(method(isAllowedValue:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn isAllowedValue(&self, value: &MLFeatureValue) -> bool;
61 );
62}
63
64impl MLFeatureDescription {
66 extern_methods!(
67 #[unsafe(method(init))]
68 #[unsafe(method_family = init)]
69 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
70
71 #[unsafe(method(new))]
72 #[unsafe(method_family = new)]
73 pub unsafe fn new() -> Retained<Self>;
74 );
75}
76
77impl MLFeatureDescription {
81 extern_methods!(
82 #[cfg(feature = "MLMultiArrayConstraint")]
83 #[unsafe(method(multiArrayConstraint))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn multiArrayConstraint(&self) -> Option<Retained<MLMultiArrayConstraint>>;
87
88 #[cfg(feature = "MLImageConstraint")]
89 #[unsafe(method(imageConstraint))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn imageConstraint(&self) -> Option<Retained<MLImageConstraint>>;
93
94 #[cfg(feature = "MLDictionaryConstraint")]
95 #[unsafe(method(dictionaryConstraint))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn dictionaryConstraint(&self) -> Option<Retained<MLDictionaryConstraint>>;
99
100 #[cfg(feature = "MLSequenceConstraint")]
101 #[unsafe(method(sequenceConstraint))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn sequenceConstraint(&self) -> Option<Retained<MLSequenceConstraint>>;
105
106 #[cfg(feature = "MLStateConstraint")]
107 #[unsafe(method(stateConstraint))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn stateConstraint(&self) -> Option<Retained<MLStateConstraint>>;
113 );
114}