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 {
80 extern_methods!(
81 #[cfg(feature = "MLMultiArrayConstraint")]
82 #[unsafe(method(multiArrayConstraint))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn multiArrayConstraint(&self) -> Option<Retained<MLMultiArrayConstraint>>;
86
87 #[cfg(feature = "MLImageConstraint")]
88 #[unsafe(method(imageConstraint))]
90 #[unsafe(method_family = none)]
91 pub unsafe fn imageConstraint(&self) -> Option<Retained<MLImageConstraint>>;
92
93 #[cfg(feature = "MLDictionaryConstraint")]
94 #[unsafe(method(dictionaryConstraint))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn dictionaryConstraint(&self) -> Option<Retained<MLDictionaryConstraint>>;
98
99 #[cfg(feature = "MLSequenceConstraint")]
100 #[unsafe(method(sequenceConstraint))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn sequenceConstraint(&self) -> Option<Retained<MLSequenceConstraint>>;
104
105 #[cfg(feature = "MLStateConstraint")]
106 #[unsafe(method(stateConstraint))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn stateConstraint(&self) -> Option<Retained<MLStateConstraint>>;
112 );
113}