objc2_core_ml/generated/
MLParameterKey.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(MLKey, NSObject))]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "MLKey")]
16 pub struct MLParameterKey;
17);
18
19#[cfg(feature = "MLKey")]
20extern_conformance!(
21 unsafe impl NSCoding for MLParameterKey {}
22);
23
24#[cfg(feature = "MLKey")]
25extern_conformance!(
26 unsafe impl NSCopying for MLParameterKey {}
27);
28
29#[cfg(feature = "MLKey")]
30unsafe impl CopyingHelper for MLParameterKey {
31 type Result = Self;
32}
33
34#[cfg(feature = "MLKey")]
35extern_conformance!(
36 unsafe impl NSObjectProtocol for MLParameterKey {}
37);
38
39#[cfg(feature = "MLKey")]
40extern_conformance!(
41 unsafe impl NSSecureCoding for MLParameterKey {}
42);
43
44#[cfg(feature = "MLKey")]
45impl MLParameterKey {
46 extern_methods!(
47 #[unsafe(method(learningRate))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn learningRate() -> Retained<MLParameterKey>;
50
51 #[unsafe(method(momentum))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn momentum() -> Retained<MLParameterKey>;
54
55 #[unsafe(method(miniBatchSize))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn miniBatchSize() -> Retained<MLParameterKey>;
58
59 #[unsafe(method(beta1))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn beta1() -> Retained<MLParameterKey>;
62
63 #[unsafe(method(beta2))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn beta2() -> Retained<MLParameterKey>;
66
67 #[unsafe(method(eps))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn eps() -> Retained<MLParameterKey>;
70
71 #[unsafe(method(epochs))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn epochs() -> Retained<MLParameterKey>;
74
75 #[unsafe(method(shuffle))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn shuffle() -> Retained<MLParameterKey>;
78
79 #[unsafe(method(seed))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn seed() -> Retained<MLParameterKey>;
82
83 #[unsafe(method(numberOfNeighbors))]
84 #[unsafe(method_family = none)]
85 pub unsafe fn numberOfNeighbors() -> Retained<MLParameterKey>;
86
87 #[unsafe(method(init))]
88 #[unsafe(method_family = init)]
89 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
90
91 #[unsafe(method(new))]
92 #[unsafe(method_family = new)]
93 pub unsafe fn new() -> Retained<Self>;
94 );
95}
96
97#[cfg(feature = "MLKey")]
99impl MLParameterKey {
100 extern_methods!(
101 #[unsafe(method(linkedModelFileName))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn linkedModelFileName() -> Retained<MLParameterKey>;
104
105 #[unsafe(method(linkedModelSearchPath))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn linkedModelSearchPath() -> Retained<MLParameterKey>;
108 );
109}
110
111#[cfg(feature = "MLKey")]
113impl MLParameterKey {
114 extern_methods!(
115 #[unsafe(method(weights))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn weights() -> Retained<MLParameterKey>;
118
119 #[unsafe(method(biases))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn biases() -> Retained<MLParameterKey>;
122 );
123}
124
125#[cfg(feature = "MLKey")]
127impl MLParameterKey {
128 extern_methods!(
129 #[unsafe(method(scopedTo:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn scopedTo(&self, scope: &NSString) -> Retained<MLParameterKey>;
132 );
133}