@rusaint/react-native 0.10.0-dev.0 → 0.10.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/jniLibs/arm64-v8a/librusaint_ffi.a +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/librusaint_ffi.a +0 -0
- package/android/src/main/jniLibs/x86/librusaint_ffi.a +0 -0
- package/android/src/main/jniLibs/x86_64/librusaint_ffi.a +0 -0
- package/build/RusaintReactNativeFramework.xcframework/Info.plist +4 -4
- package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeRequirements +0 -0
- package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeResources +128 -0
- package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeSignature +0 -0
- package/build/RusaintReactNativeFramework.xcframework/ios-arm64/librusaint_ffi.a +0 -0
- package/build/RusaintReactNativeFramework.xcframework/ios-arm64-simulator/librusaint_ffi.a +0 -0
- package/cpp/generated/rusaint.cpp +1762 -1705
- package/cpp/generated/rusaint.hpp +64 -153
- package/cpp/generated/rusaint_ffi.cpp +5235 -6669
- package/cpp/generated/rusaint_ffi.hpp +255 -858
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/NativeReactNative.d.ts +8 -0
- package/lib/typescript/module/src/NativeReactNative.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/rusaint-ffi.d.ts +109 -0
- package/lib/typescript/module/src/generated/rusaint-ffi.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/rusaint.d.ts +2330 -0
- package/lib/typescript/module/src/generated/rusaint.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/rusaint_ffi-ffi.d.ts +300 -0
- package/lib/typescript/module/src/generated/rusaint_ffi-ffi.d.ts.map +1 -0
- package/lib/typescript/module/src/generated/rusaint_ffi.d.ts +1111 -0
- package/lib/typescript/module/src/generated/rusaint_ffi.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +10 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1,287 +1,454 @@
|
|
|
1
|
-
// This file was autogenerated by some hot garbage in the
|
|
2
|
-
//
|
|
3
|
-
// it!
|
|
1
|
+
// This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
|
|
2
|
+
// Trust me, you don't want to mess with it!
|
|
4
3
|
#include "rusaint.hpp"
|
|
5
4
|
|
|
6
5
|
#include "UniffiJsiTypes.h"
|
|
7
|
-
#include <iostream>
|
|
8
|
-
#include <map>
|
|
9
6
|
#include <stdexcept>
|
|
10
|
-
#include <
|
|
7
|
+
#include <map>
|
|
11
8
|
#include <utility>
|
|
9
|
+
#include <iostream>
|
|
10
|
+
#include <thread>
|
|
12
11
|
|
|
13
12
|
namespace react = facebook::react;
|
|
14
13
|
namespace jsi = facebook::jsi;
|
|
15
14
|
|
|
16
15
|
// Calling into Rust.
|
|
17
16
|
extern "C" {
|
|
18
|
-
typedef void
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
typedef
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
uint64_t callback_data,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
uint64_t callback_data,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
typedef void
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
void
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
RustBuffer
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
void
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
void *
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
void
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
void
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
void
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
void
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
void
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
void
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
void
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
void
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
void
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
void
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
uint16_t
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
17
|
+
typedef void
|
|
18
|
+
(*UniffiRustFutureContinuationCallback)(
|
|
19
|
+
uint64_t data,
|
|
20
|
+
int8_t poll_result
|
|
21
|
+
);
|
|
22
|
+
typedef void
|
|
23
|
+
(*UniffiForeignFutureFree)(
|
|
24
|
+
uint64_t handle
|
|
25
|
+
);
|
|
26
|
+
typedef void
|
|
27
|
+
(*UniffiCallbackInterfaceFree)(
|
|
28
|
+
uint64_t handle
|
|
29
|
+
);typedef struct UniffiForeignFuture {
|
|
30
|
+
uint64_t handle;
|
|
31
|
+
UniffiForeignFutureFree free;
|
|
32
|
+
} UniffiForeignFuture;typedef struct UniffiForeignFutureStructU8 {
|
|
33
|
+
uint8_t return_value;
|
|
34
|
+
RustCallStatus call_status;
|
|
35
|
+
} UniffiForeignFutureStructU8;
|
|
36
|
+
typedef void
|
|
37
|
+
(*UniffiForeignFutureCompleteU8)(
|
|
38
|
+
uint64_t callback_data,
|
|
39
|
+
UniffiForeignFutureStructU8 result
|
|
40
|
+
);typedef struct UniffiForeignFutureStructI8 {
|
|
41
|
+
int8_t return_value;
|
|
42
|
+
RustCallStatus call_status;
|
|
43
|
+
} UniffiForeignFutureStructI8;
|
|
44
|
+
typedef void
|
|
45
|
+
(*UniffiForeignFutureCompleteI8)(
|
|
46
|
+
uint64_t callback_data,
|
|
47
|
+
UniffiForeignFutureStructI8 result
|
|
48
|
+
);typedef struct UniffiForeignFutureStructU16 {
|
|
49
|
+
uint16_t return_value;
|
|
50
|
+
RustCallStatus call_status;
|
|
51
|
+
} UniffiForeignFutureStructU16;
|
|
52
|
+
typedef void
|
|
53
|
+
(*UniffiForeignFutureCompleteU16)(
|
|
54
|
+
uint64_t callback_data,
|
|
55
|
+
UniffiForeignFutureStructU16 result
|
|
56
|
+
);typedef struct UniffiForeignFutureStructI16 {
|
|
57
|
+
int16_t return_value;
|
|
58
|
+
RustCallStatus call_status;
|
|
59
|
+
} UniffiForeignFutureStructI16;
|
|
60
|
+
typedef void
|
|
61
|
+
(*UniffiForeignFutureCompleteI16)(
|
|
62
|
+
uint64_t callback_data,
|
|
63
|
+
UniffiForeignFutureStructI16 result
|
|
64
|
+
);typedef struct UniffiForeignFutureStructU32 {
|
|
65
|
+
uint32_t return_value;
|
|
66
|
+
RustCallStatus call_status;
|
|
67
|
+
} UniffiForeignFutureStructU32;
|
|
68
|
+
typedef void
|
|
69
|
+
(*UniffiForeignFutureCompleteU32)(
|
|
70
|
+
uint64_t callback_data,
|
|
71
|
+
UniffiForeignFutureStructU32 result
|
|
72
|
+
);typedef struct UniffiForeignFutureStructI32 {
|
|
73
|
+
int32_t return_value;
|
|
74
|
+
RustCallStatus call_status;
|
|
75
|
+
} UniffiForeignFutureStructI32;
|
|
76
|
+
typedef void
|
|
77
|
+
(*UniffiForeignFutureCompleteI32)(
|
|
78
|
+
uint64_t callback_data,
|
|
79
|
+
UniffiForeignFutureStructI32 result
|
|
80
|
+
);typedef struct UniffiForeignFutureStructU64 {
|
|
81
|
+
uint64_t return_value;
|
|
82
|
+
RustCallStatus call_status;
|
|
83
|
+
} UniffiForeignFutureStructU64;
|
|
84
|
+
typedef void
|
|
85
|
+
(*UniffiForeignFutureCompleteU64)(
|
|
86
|
+
uint64_t callback_data,
|
|
87
|
+
UniffiForeignFutureStructU64 result
|
|
88
|
+
);typedef struct UniffiForeignFutureStructI64 {
|
|
89
|
+
int64_t return_value;
|
|
90
|
+
RustCallStatus call_status;
|
|
91
|
+
} UniffiForeignFutureStructI64;
|
|
92
|
+
typedef void
|
|
93
|
+
(*UniffiForeignFutureCompleteI64)(
|
|
94
|
+
uint64_t callback_data,
|
|
95
|
+
UniffiForeignFutureStructI64 result
|
|
96
|
+
);typedef struct UniffiForeignFutureStructF32 {
|
|
97
|
+
float return_value;
|
|
98
|
+
RustCallStatus call_status;
|
|
99
|
+
} UniffiForeignFutureStructF32;
|
|
100
|
+
typedef void
|
|
101
|
+
(*UniffiForeignFutureCompleteF32)(
|
|
102
|
+
uint64_t callback_data,
|
|
103
|
+
UniffiForeignFutureStructF32 result
|
|
104
|
+
);typedef struct UniffiForeignFutureStructF64 {
|
|
105
|
+
double return_value;
|
|
106
|
+
RustCallStatus call_status;
|
|
107
|
+
} UniffiForeignFutureStructF64;
|
|
108
|
+
typedef void
|
|
109
|
+
(*UniffiForeignFutureCompleteF64)(
|
|
110
|
+
uint64_t callback_data,
|
|
111
|
+
UniffiForeignFutureStructF64 result
|
|
112
|
+
);typedef struct UniffiForeignFutureStructPointer {
|
|
113
|
+
void * return_value;
|
|
114
|
+
RustCallStatus call_status;
|
|
115
|
+
} UniffiForeignFutureStructPointer;
|
|
116
|
+
typedef void
|
|
117
|
+
(*UniffiForeignFutureCompletePointer)(
|
|
118
|
+
uint64_t callback_data,
|
|
119
|
+
UniffiForeignFutureStructPointer result
|
|
120
|
+
);typedef struct UniffiForeignFutureStructRustBuffer {
|
|
121
|
+
RustBuffer return_value;
|
|
122
|
+
RustCallStatus call_status;
|
|
123
|
+
} UniffiForeignFutureStructRustBuffer;
|
|
124
|
+
typedef void
|
|
125
|
+
(*UniffiForeignFutureCompleteRustBuffer)(
|
|
126
|
+
uint64_t callback_data,
|
|
127
|
+
UniffiForeignFutureStructRustBuffer result
|
|
128
|
+
);typedef struct UniffiForeignFutureStructVoid {
|
|
129
|
+
RustCallStatus call_status;
|
|
130
|
+
} UniffiForeignFutureStructVoid;
|
|
131
|
+
typedef void
|
|
132
|
+
(*UniffiForeignFutureCompleteVoid)(
|
|
133
|
+
uint64_t callback_data,
|
|
134
|
+
UniffiForeignFutureStructVoid result
|
|
135
|
+
);
|
|
136
|
+
void * uniffi_rusaint_fn_clone_lecturecategorybuilder(
|
|
137
|
+
void * ptr,
|
|
138
|
+
RustCallStatus *uniffi_out_err
|
|
139
|
+
);
|
|
140
|
+
void uniffi_rusaint_fn_free_lecturecategorybuilder(
|
|
141
|
+
void * ptr,
|
|
142
|
+
RustCallStatus *uniffi_out_err
|
|
143
|
+
);
|
|
144
|
+
void * uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(RustCallStatus *uniffi_out_err
|
|
145
|
+
);
|
|
146
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(
|
|
147
|
+
void * ptr,
|
|
148
|
+
RustBuffer lecture_name,
|
|
149
|
+
RustCallStatus *uniffi_out_err
|
|
150
|
+
);
|
|
151
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(
|
|
152
|
+
void * ptr,
|
|
153
|
+
RustBuffer major,
|
|
154
|
+
RustCallStatus *uniffi_out_err
|
|
155
|
+
);
|
|
156
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(
|
|
157
|
+
void * ptr,
|
|
158
|
+
RustCallStatus *uniffi_out_err
|
|
159
|
+
);
|
|
160
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_education(
|
|
161
|
+
void * ptr,
|
|
162
|
+
RustCallStatus *uniffi_out_err
|
|
163
|
+
);
|
|
164
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(
|
|
165
|
+
void * ptr,
|
|
166
|
+
RustBuffer keyword,
|
|
167
|
+
RustCallStatus *uniffi_out_err
|
|
168
|
+
);
|
|
169
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(
|
|
170
|
+
void * ptr,
|
|
171
|
+
RustBuffer keyword,
|
|
172
|
+
RustCallStatus *uniffi_out_err
|
|
173
|
+
);
|
|
174
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(
|
|
175
|
+
void * ptr,
|
|
176
|
+
RustBuffer collage,
|
|
177
|
+
RustBuffer department,
|
|
178
|
+
RustCallStatus *uniffi_out_err
|
|
179
|
+
);
|
|
180
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_major(
|
|
181
|
+
void * ptr,
|
|
182
|
+
RustBuffer collage,
|
|
183
|
+
RustBuffer department,
|
|
184
|
+
RustBuffer major,
|
|
185
|
+
RustCallStatus *uniffi_out_err
|
|
186
|
+
);
|
|
187
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(
|
|
188
|
+
void * ptr,
|
|
189
|
+
RustBuffer category,
|
|
190
|
+
RustCallStatus *uniffi_out_err
|
|
191
|
+
);
|
|
192
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(
|
|
193
|
+
void * ptr,
|
|
194
|
+
RustBuffer collage,
|
|
195
|
+
RustBuffer department,
|
|
196
|
+
RustBuffer major,
|
|
197
|
+
RustCallStatus *uniffi_out_err
|
|
198
|
+
);
|
|
199
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(
|
|
200
|
+
void * ptr,
|
|
201
|
+
RustBuffer lecture_name,
|
|
202
|
+
RustCallStatus *uniffi_out_err
|
|
203
|
+
);
|
|
204
|
+
RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(
|
|
205
|
+
void * ptr,
|
|
206
|
+
RustBuffer major,
|
|
207
|
+
RustCallStatus *uniffi_out_err
|
|
208
|
+
);
|
|
209
|
+
RustBuffer ffi_rusaint_rustbuffer_alloc(
|
|
210
|
+
uint64_t size,
|
|
211
|
+
RustCallStatus *uniffi_out_err
|
|
212
|
+
);
|
|
213
|
+
RustBuffer ffi_rusaint_rustbuffer_from_bytes(
|
|
214
|
+
ForeignBytes bytes,
|
|
215
|
+
RustCallStatus *uniffi_out_err
|
|
216
|
+
);
|
|
217
|
+
void ffi_rusaint_rustbuffer_free(
|
|
218
|
+
RustBuffer buf,
|
|
219
|
+
RustCallStatus *uniffi_out_err
|
|
220
|
+
);
|
|
221
|
+
RustBuffer ffi_rusaint_rustbuffer_reserve(
|
|
222
|
+
RustBuffer buf,
|
|
223
|
+
uint64_t additional,
|
|
224
|
+
RustCallStatus *uniffi_out_err
|
|
225
|
+
);
|
|
226
|
+
void ffi_rusaint_rust_future_poll_u8(
|
|
227
|
+
/*handle*/ uint64_t handle,
|
|
228
|
+
UniffiRustFutureContinuationCallback callback,
|
|
229
|
+
/*handle*/ uint64_t callback_data
|
|
230
|
+
);
|
|
231
|
+
void ffi_rusaint_rust_future_cancel_u8(
|
|
232
|
+
/*handle*/ uint64_t handle
|
|
233
|
+
);
|
|
234
|
+
void ffi_rusaint_rust_future_free_u8(
|
|
235
|
+
/*handle*/ uint64_t handle
|
|
236
|
+
);
|
|
237
|
+
uint8_t ffi_rusaint_rust_future_complete_u8(
|
|
238
|
+
/*handle*/ uint64_t handle,
|
|
239
|
+
RustCallStatus *uniffi_out_err
|
|
240
|
+
);
|
|
241
|
+
void ffi_rusaint_rust_future_poll_i8(
|
|
242
|
+
/*handle*/ uint64_t handle,
|
|
243
|
+
UniffiRustFutureContinuationCallback callback,
|
|
244
|
+
/*handle*/ uint64_t callback_data
|
|
245
|
+
);
|
|
246
|
+
void ffi_rusaint_rust_future_cancel_i8(
|
|
247
|
+
/*handle*/ uint64_t handle
|
|
248
|
+
);
|
|
249
|
+
void ffi_rusaint_rust_future_free_i8(
|
|
250
|
+
/*handle*/ uint64_t handle
|
|
251
|
+
);
|
|
252
|
+
int8_t ffi_rusaint_rust_future_complete_i8(
|
|
253
|
+
/*handle*/ uint64_t handle,
|
|
254
|
+
RustCallStatus *uniffi_out_err
|
|
255
|
+
);
|
|
256
|
+
void ffi_rusaint_rust_future_poll_u16(
|
|
257
|
+
/*handle*/ uint64_t handle,
|
|
258
|
+
UniffiRustFutureContinuationCallback callback,
|
|
259
|
+
/*handle*/ uint64_t callback_data
|
|
260
|
+
);
|
|
261
|
+
void ffi_rusaint_rust_future_cancel_u16(
|
|
262
|
+
/*handle*/ uint64_t handle
|
|
263
|
+
);
|
|
264
|
+
void ffi_rusaint_rust_future_free_u16(
|
|
265
|
+
/*handle*/ uint64_t handle
|
|
266
|
+
);
|
|
267
|
+
uint16_t ffi_rusaint_rust_future_complete_u16(
|
|
268
|
+
/*handle*/ uint64_t handle,
|
|
269
|
+
RustCallStatus *uniffi_out_err
|
|
270
|
+
);
|
|
271
|
+
void ffi_rusaint_rust_future_poll_i16(
|
|
272
|
+
/*handle*/ uint64_t handle,
|
|
273
|
+
UniffiRustFutureContinuationCallback callback,
|
|
274
|
+
/*handle*/ uint64_t callback_data
|
|
275
|
+
);
|
|
276
|
+
void ffi_rusaint_rust_future_cancel_i16(
|
|
277
|
+
/*handle*/ uint64_t handle
|
|
278
|
+
);
|
|
279
|
+
void ffi_rusaint_rust_future_free_i16(
|
|
280
|
+
/*handle*/ uint64_t handle
|
|
281
|
+
);
|
|
282
|
+
int16_t ffi_rusaint_rust_future_complete_i16(
|
|
283
|
+
/*handle*/ uint64_t handle,
|
|
284
|
+
RustCallStatus *uniffi_out_err
|
|
285
|
+
);
|
|
286
|
+
void ffi_rusaint_rust_future_poll_u32(
|
|
287
|
+
/*handle*/ uint64_t handle,
|
|
288
|
+
UniffiRustFutureContinuationCallback callback,
|
|
289
|
+
/*handle*/ uint64_t callback_data
|
|
290
|
+
);
|
|
291
|
+
void ffi_rusaint_rust_future_cancel_u32(
|
|
292
|
+
/*handle*/ uint64_t handle
|
|
293
|
+
);
|
|
294
|
+
void ffi_rusaint_rust_future_free_u32(
|
|
295
|
+
/*handle*/ uint64_t handle
|
|
296
|
+
);
|
|
297
|
+
uint32_t ffi_rusaint_rust_future_complete_u32(
|
|
298
|
+
/*handle*/ uint64_t handle,
|
|
299
|
+
RustCallStatus *uniffi_out_err
|
|
300
|
+
);
|
|
301
|
+
void ffi_rusaint_rust_future_poll_i32(
|
|
302
|
+
/*handle*/ uint64_t handle,
|
|
303
|
+
UniffiRustFutureContinuationCallback callback,
|
|
304
|
+
/*handle*/ uint64_t callback_data
|
|
305
|
+
);
|
|
306
|
+
void ffi_rusaint_rust_future_cancel_i32(
|
|
307
|
+
/*handle*/ uint64_t handle
|
|
308
|
+
);
|
|
309
|
+
void ffi_rusaint_rust_future_free_i32(
|
|
310
|
+
/*handle*/ uint64_t handle
|
|
311
|
+
);
|
|
312
|
+
int32_t ffi_rusaint_rust_future_complete_i32(
|
|
313
|
+
/*handle*/ uint64_t handle,
|
|
314
|
+
RustCallStatus *uniffi_out_err
|
|
315
|
+
);
|
|
316
|
+
void ffi_rusaint_rust_future_poll_u64(
|
|
317
|
+
/*handle*/ uint64_t handle,
|
|
318
|
+
UniffiRustFutureContinuationCallback callback,
|
|
319
|
+
/*handle*/ uint64_t callback_data
|
|
320
|
+
);
|
|
321
|
+
void ffi_rusaint_rust_future_cancel_u64(
|
|
322
|
+
/*handle*/ uint64_t handle
|
|
323
|
+
);
|
|
324
|
+
void ffi_rusaint_rust_future_free_u64(
|
|
325
|
+
/*handle*/ uint64_t handle
|
|
326
|
+
);
|
|
327
|
+
uint64_t ffi_rusaint_rust_future_complete_u64(
|
|
328
|
+
/*handle*/ uint64_t handle,
|
|
329
|
+
RustCallStatus *uniffi_out_err
|
|
330
|
+
);
|
|
331
|
+
void ffi_rusaint_rust_future_poll_i64(
|
|
332
|
+
/*handle*/ uint64_t handle,
|
|
333
|
+
UniffiRustFutureContinuationCallback callback,
|
|
334
|
+
/*handle*/ uint64_t callback_data
|
|
335
|
+
);
|
|
336
|
+
void ffi_rusaint_rust_future_cancel_i64(
|
|
337
|
+
/*handle*/ uint64_t handle
|
|
338
|
+
);
|
|
339
|
+
void ffi_rusaint_rust_future_free_i64(
|
|
340
|
+
/*handle*/ uint64_t handle
|
|
341
|
+
);
|
|
342
|
+
int64_t ffi_rusaint_rust_future_complete_i64(
|
|
343
|
+
/*handle*/ uint64_t handle,
|
|
344
|
+
RustCallStatus *uniffi_out_err
|
|
345
|
+
);
|
|
346
|
+
void ffi_rusaint_rust_future_poll_f32(
|
|
347
|
+
/*handle*/ uint64_t handle,
|
|
348
|
+
UniffiRustFutureContinuationCallback callback,
|
|
349
|
+
/*handle*/ uint64_t callback_data
|
|
350
|
+
);
|
|
351
|
+
void ffi_rusaint_rust_future_cancel_f32(
|
|
352
|
+
/*handle*/ uint64_t handle
|
|
353
|
+
);
|
|
354
|
+
void ffi_rusaint_rust_future_free_f32(
|
|
355
|
+
/*handle*/ uint64_t handle
|
|
356
|
+
);
|
|
357
|
+
float ffi_rusaint_rust_future_complete_f32(
|
|
358
|
+
/*handle*/ uint64_t handle,
|
|
359
|
+
RustCallStatus *uniffi_out_err
|
|
360
|
+
);
|
|
361
|
+
void ffi_rusaint_rust_future_poll_f64(
|
|
362
|
+
/*handle*/ uint64_t handle,
|
|
363
|
+
UniffiRustFutureContinuationCallback callback,
|
|
364
|
+
/*handle*/ uint64_t callback_data
|
|
365
|
+
);
|
|
366
|
+
void ffi_rusaint_rust_future_cancel_f64(
|
|
367
|
+
/*handle*/ uint64_t handle
|
|
368
|
+
);
|
|
369
|
+
void ffi_rusaint_rust_future_free_f64(
|
|
370
|
+
/*handle*/ uint64_t handle
|
|
371
|
+
);
|
|
372
|
+
double ffi_rusaint_rust_future_complete_f64(
|
|
373
|
+
/*handle*/ uint64_t handle,
|
|
374
|
+
RustCallStatus *uniffi_out_err
|
|
375
|
+
);
|
|
376
|
+
void ffi_rusaint_rust_future_poll_pointer(
|
|
377
|
+
/*handle*/ uint64_t handle,
|
|
378
|
+
UniffiRustFutureContinuationCallback callback,
|
|
379
|
+
/*handle*/ uint64_t callback_data
|
|
380
|
+
);
|
|
381
|
+
void ffi_rusaint_rust_future_cancel_pointer(
|
|
382
|
+
/*handle*/ uint64_t handle
|
|
383
|
+
);
|
|
384
|
+
void ffi_rusaint_rust_future_free_pointer(
|
|
385
|
+
/*handle*/ uint64_t handle
|
|
386
|
+
);
|
|
387
|
+
void * ffi_rusaint_rust_future_complete_pointer(
|
|
388
|
+
/*handle*/ uint64_t handle,
|
|
389
|
+
RustCallStatus *uniffi_out_err
|
|
390
|
+
);
|
|
391
|
+
void ffi_rusaint_rust_future_poll_rust_buffer(
|
|
392
|
+
/*handle*/ uint64_t handle,
|
|
393
|
+
UniffiRustFutureContinuationCallback callback,
|
|
394
|
+
/*handle*/ uint64_t callback_data
|
|
395
|
+
);
|
|
396
|
+
void ffi_rusaint_rust_future_cancel_rust_buffer(
|
|
397
|
+
/*handle*/ uint64_t handle
|
|
398
|
+
);
|
|
399
|
+
void ffi_rusaint_rust_future_free_rust_buffer(
|
|
400
|
+
/*handle*/ uint64_t handle
|
|
401
|
+
);
|
|
402
|
+
RustBuffer ffi_rusaint_rust_future_complete_rust_buffer(
|
|
403
|
+
/*handle*/ uint64_t handle,
|
|
404
|
+
RustCallStatus *uniffi_out_err
|
|
405
|
+
);
|
|
406
|
+
void ffi_rusaint_rust_future_poll_void(
|
|
407
|
+
/*handle*/ uint64_t handle,
|
|
408
|
+
UniffiRustFutureContinuationCallback callback,
|
|
409
|
+
/*handle*/ uint64_t callback_data
|
|
410
|
+
);
|
|
411
|
+
void ffi_rusaint_rust_future_cancel_void(
|
|
412
|
+
/*handle*/ uint64_t handle
|
|
413
|
+
);
|
|
414
|
+
void ffi_rusaint_rust_future_free_void(
|
|
415
|
+
/*handle*/ uint64_t handle
|
|
416
|
+
);
|
|
417
|
+
void ffi_rusaint_rust_future_complete_void(
|
|
418
|
+
/*handle*/ uint64_t handle,
|
|
419
|
+
RustCallStatus *uniffi_out_err
|
|
420
|
+
);
|
|
421
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel(
|
|
422
|
+
);
|
|
423
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major(
|
|
424
|
+
);
|
|
425
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber(
|
|
426
|
+
);
|
|
427
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_education(
|
|
428
|
+
);
|
|
429
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture(
|
|
430
|
+
);
|
|
431
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor(
|
|
432
|
+
);
|
|
433
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated(
|
|
434
|
+
);
|
|
435
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_major(
|
|
436
|
+
);
|
|
437
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective(
|
|
438
|
+
);
|
|
439
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major(
|
|
440
|
+
);
|
|
441
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective(
|
|
442
|
+
);
|
|
443
|
+
uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major(
|
|
444
|
+
);
|
|
445
|
+
uint16_t uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new(
|
|
446
|
+
);
|
|
447
|
+
uint32_t ffi_rusaint_uniffi_contract_version(
|
|
448
|
+
);
|
|
283
449
|
}
|
|
284
450
|
|
|
451
|
+
|
|
285
452
|
namespace uniffi::rusaint {
|
|
286
453
|
template <typename T> struct Bridging;
|
|
287
454
|
|
|
@@ -300,9 +467,10 @@ template <typename T> struct Bridging<ReferenceHolder<T>> {
|
|
|
300
467
|
auto pointee = obj.getProperty(rt, "pointee");
|
|
301
468
|
return uniffi::rusaint::Bridging<T>::fromJs(rt, callInvoker, pointee);
|
|
302
469
|
}
|
|
303
|
-
throw jsi::JSError(
|
|
304
|
-
|
|
305
|
-
|
|
470
|
+
throw jsi::JSError(
|
|
471
|
+
rt,
|
|
472
|
+
"Expected ReferenceHolder to have a pointee property. This is likely a bug in uniffi-bindgen-react-native"
|
|
473
|
+
);
|
|
306
474
|
}
|
|
307
475
|
};
|
|
308
476
|
} // namespace uniffi::rusaint
|
|
@@ -312,26 +480,33 @@ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
|
312
480
|
|
|
313
481
|
template <> struct Bridging<RustBuffer> {
|
|
314
482
|
static RustBuffer rustbuffer_alloc(int32_t size) {
|
|
315
|
-
|
|
316
|
-
|
|
483
|
+
RustCallStatus status = { UNIFFI_CALL_STATUS_OK };
|
|
484
|
+
return ffi_rusaint_rustbuffer_alloc(
|
|
485
|
+
size,
|
|
486
|
+
&status
|
|
487
|
+
);
|
|
317
488
|
}
|
|
318
489
|
|
|
319
490
|
static void rustbuffer_free(RustBuffer buf) {
|
|
320
|
-
RustCallStatus status = {UNIFFI_CALL_STATUS_OK};
|
|
321
|
-
ffi_rusaint_rustbuffer_free(
|
|
491
|
+
RustCallStatus status = { UNIFFI_CALL_STATUS_OK };
|
|
492
|
+
ffi_rusaint_rustbuffer_free(
|
|
493
|
+
buf,
|
|
494
|
+
&status
|
|
495
|
+
);
|
|
322
496
|
}
|
|
323
497
|
|
|
324
498
|
static RustBuffer rustbuffer_from_bytes(ForeignBytes bytes) {
|
|
325
|
-
RustCallStatus status = {UNIFFI_CALL_STATUS_OK};
|
|
326
|
-
return ffi_rusaint_rustbuffer_from_bytes(
|
|
499
|
+
RustCallStatus status = { UNIFFI_CALL_STATUS_OK };
|
|
500
|
+
return ffi_rusaint_rustbuffer_from_bytes(
|
|
501
|
+
bytes,
|
|
502
|
+
&status
|
|
503
|
+
);
|
|
327
504
|
}
|
|
328
505
|
|
|
329
506
|
static RustBuffer fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker>,
|
|
330
507
|
const jsi::Value &value) {
|
|
331
508
|
try {
|
|
332
|
-
auto buffer =
|
|
333
|
-
uniffi_jsi::Bridging<jsi::ArrayBuffer>::value_to_arraybuffer(rt,
|
|
334
|
-
value);
|
|
509
|
+
auto buffer = uniffi_jsi::Bridging<jsi::ArrayBuffer>::value_to_arraybuffer(rt, value);
|
|
335
510
|
auto bytes = ForeignBytes{
|
|
336
511
|
.len = static_cast<int32_t>(buffer.length(rt)),
|
|
337
512
|
.data = buffer.data(rt),
|
|
@@ -368,9 +543,7 @@ template <> struct Bridging<RustBuffer> {
|
|
|
368
543
|
rustbuffer_free(buf);
|
|
369
544
|
|
|
370
545
|
// Finally, return the ArrayBuffer.
|
|
371
|
-
return uniffi_jsi::Bridging<jsi::ArrayBuffer>::arraybuffer_to_value(
|
|
372
|
-
rt, arrayBuffer);
|
|
373
|
-
;
|
|
546
|
+
return uniffi_jsi::Bridging<jsi::ArrayBuffer>::arraybuffer_to_value(rt, arrayBuffer);;
|
|
374
547
|
}
|
|
375
548
|
};
|
|
376
549
|
|
|
@@ -395,7 +568,8 @@ template <> struct Bridging<RustCallStatus> {
|
|
|
395
568
|
const jsi::Value &jsStatus) {
|
|
396
569
|
auto statusObject = jsStatus.asObject(rt);
|
|
397
570
|
if (status.error_buf.data != nullptr) {
|
|
398
|
-
auto rbuf = Bridging<RustBuffer>::toJs(rt, callInvoker,
|
|
571
|
+
auto rbuf = Bridging<RustBuffer>::toJs(rt, callInvoker,
|
|
572
|
+
status.error_buf);
|
|
399
573
|
statusObject.setProperty(rt, "errorBuf", rbuf);
|
|
400
574
|
}
|
|
401
575
|
if (status.code != UNIFFI_CALL_STATUS_OK) {
|
|
@@ -412,7 +586,8 @@ template <> struct Bridging<RustCallStatus> {
|
|
|
412
586
|
auto statusObject = jsStatus.asObject(rt);
|
|
413
587
|
if (statusObject.hasProperty(rt, "errorBuf")) {
|
|
414
588
|
auto rbuf = statusObject.getProperty(rt, "errorBuf");
|
|
415
|
-
status.error_buf =
|
|
589
|
+
status.error_buf =
|
|
590
|
+
Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
|
|
416
591
|
}
|
|
417
592
|
if (statusObject.hasProperty(rt, "code")) {
|
|
418
593
|
auto code = statusObject.getProperty(rt, "code");
|
|
@@ -426,7 +601,8 @@ template <> struct Bridging<RustCallStatus> {
|
|
|
426
601
|
auto statusObject = jsStatus.asObject(rt);
|
|
427
602
|
if (statusObject.hasProperty(rt, "errorBuf")) {
|
|
428
603
|
auto rbuf = statusObject.getProperty(rt, "errorBuf");
|
|
429
|
-
status->error_buf =
|
|
604
|
+
status->error_buf =
|
|
605
|
+
Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
|
|
430
606
|
}
|
|
431
607
|
if (statusObject.hasProperty(rt, "code")) {
|
|
432
608
|
auto code = statusObject.getProperty(rt, "code");
|
|
@@ -441,309 +617,329 @@ template <> struct Bridging<RustCallStatus> {
|
|
|
441
617
|
// Here, we need to hold on to them, but also be able to clear them at just the
|
|
442
618
|
// right time so we can support hot-reloading.
|
|
443
619
|
namespace uniffi::rusaint::registry {
|
|
444
|
-
template <typename T>
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
//
|
|
452
|
-
//
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
//
|
|
457
|
-
//
|
|
458
|
-
//
|
|
459
|
-
//
|
|
460
|
-
//
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
620
|
+
template <typename T>
|
|
621
|
+
class VTableHolder {
|
|
622
|
+
public:
|
|
623
|
+
T vtable;
|
|
624
|
+
VTableHolder(T v) : vtable(v) {}
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
// Mutex to bind the storage and setting of vtable together.
|
|
628
|
+
// We declare it here, but the lock is taken by callers of the putTable
|
|
629
|
+
// method who are also sending a pointer to Rust.
|
|
630
|
+
static std::mutex vtableMutex;
|
|
631
|
+
|
|
632
|
+
// Registry to hold all vtables so they persist even when JS objects are GC'd.
|
|
633
|
+
// The only reason this exists is to prevent a dangling pointer in the
|
|
634
|
+
// Rust machinery: i.e. we don't need to access or write to this registry
|
|
635
|
+
// after startup.
|
|
636
|
+
// Registry to hold all vtables so they persist even when JS objects are GC'd.
|
|
637
|
+
// Maps string identifiers to vtable holders using type erasure
|
|
638
|
+
static std::unordered_map<std::string, std::shared_ptr<void>> vtableRegistry;
|
|
639
|
+
|
|
640
|
+
// Add a vtable to the registry with an identifier
|
|
641
|
+
template <typename T>
|
|
642
|
+
static T* putTable(std::string_view identifier, T vtable) {
|
|
643
|
+
auto holder = std::make_shared<VTableHolder<T>>(vtable);
|
|
644
|
+
// Store the raw pointer to the vtable before type erasure
|
|
645
|
+
T* rawPtr = &(holder->vtable);
|
|
646
|
+
// Store the holder using type erasure with the string identifier
|
|
647
|
+
vtableRegistry[std::string(identifier)] = std::shared_ptr<void>(holder);
|
|
648
|
+
return rawPtr;
|
|
649
|
+
}
|
|
473
650
|
|
|
474
|
-
// Clear the registry.
|
|
475
|
-
//
|
|
476
|
-
// Conceptually, this is called after teardown of the module (i.e. after
|
|
477
|
-
// teardown of the jsi::Runtime). However, because Rust is dropping callbacks
|
|
478
|
-
// because the Runtime is being torn down, we must keep the registry intact
|
|
479
|
-
// until after the runtime goes away.
|
|
480
|
-
//
|
|
481
|
-
// Therefore, in practice we should call this when the next runtime is
|
|
482
|
-
// being stood up.
|
|
483
|
-
static void clearRegistry() {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
}
|
|
651
|
+
// Clear the registry.
|
|
652
|
+
//
|
|
653
|
+
// Conceptually, this is called after teardown of the module (i.e. after
|
|
654
|
+
// teardown of the jsi::Runtime). However, because Rust is dropping callbacks
|
|
655
|
+
// because the Runtime is being torn down, we must keep the registry intact
|
|
656
|
+
// until after the runtime goes away.
|
|
657
|
+
//
|
|
658
|
+
// Therefore, in practice we should call this when the next runtime is
|
|
659
|
+
// being stood up.
|
|
660
|
+
static void clearRegistry() {
|
|
661
|
+
std::lock_guard<std::mutex> lock(vtableMutex);
|
|
662
|
+
vtableRegistry.clear();
|
|
663
|
+
}
|
|
487
664
|
} // namespace uniffi::rusaint::registry
|
|
488
665
|
|
|
489
666
|
// This calls into Rust.
|
|
490
|
-
// Implementation of callback function calling from Rust to JS
|
|
491
|
-
// RustFutureContinuationCallback
|
|
667
|
+
// Implementation of callback function calling from Rust to JS RustFutureContinuationCallback
|
|
492
668
|
|
|
493
|
-
// Callback function:
|
|
494
|
-
// uniffi::rusaint::cb::rustfuturecontinuationcallback::UniffiRustFutureContinuationCallback
|
|
669
|
+
// Callback function: uniffi::rusaint::cb::rustfuturecontinuationcallback::UniffiRustFutureContinuationCallback
|
|
495
670
|
//
|
|
496
671
|
// We have the following constraints:
|
|
497
672
|
// - we need to pass a function pointer to Rust.
|
|
498
673
|
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
499
674
|
// - function pointers can't store state, so we can't use a lamda.
|
|
500
675
|
//
|
|
501
|
-
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
502
|
-
//
|
|
503
|
-
// into JS.
|
|
676
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback` function calls
|
|
677
|
+
// the lambda, which itself calls the `body` which then calls into JS.
|
|
504
678
|
//
|
|
505
|
-
// We then give the `callback` function pointer to Rust which will call the
|
|
506
|
-
//
|
|
679
|
+
// We then give the `callback` function pointer to Rust which will call the lambda sometime in the
|
|
680
|
+
// future.
|
|
507
681
|
namespace uniffi::rusaint::cb::rustfuturecontinuationcallback {
|
|
508
|
-
using namespace facebook;
|
|
509
|
-
|
|
510
|
-
// We need to store a lambda in a global so we can call it from
|
|
511
|
-
// a function pointer. The function pointer is passed to Rust.
|
|
512
|
-
static std::function<void(uint64_t, int8_t)> rsLambda = nullptr;
|
|
513
|
-
|
|
514
|
-
// This is the main body of the callback. It's called from the lambda,
|
|
515
|
-
// which itself is called from the callback function which is passed to Rust.
|
|
516
|
-
static void body(jsi::Runtime &rt,
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
//
|
|
546
|
-
// Answer: the module destructor calls into callback `cleanup` method,
|
|
547
|
-
// which nulls out the rsLamda.
|
|
548
|
-
//
|
|
549
|
-
// If rsLamda is null, then there is no runtime to call into.
|
|
550
|
-
if (rsLambda == nullptr) {
|
|
551
|
-
// This only occurs when destructors are calling into Rust free/drop,
|
|
552
|
-
// which causes the JS callback to be dropped.
|
|
553
|
-
return;
|
|
554
|
-
}
|
|
682
|
+
using namespace facebook;
|
|
683
|
+
|
|
684
|
+
// We need to store a lambda in a global so we can call it from
|
|
685
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
686
|
+
static std::function<void(uint64_t, int8_t)> rsLambda = nullptr;
|
|
687
|
+
|
|
688
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
689
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
690
|
+
static void body(jsi::Runtime &rt,
|
|
691
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
692
|
+
std::shared_ptr<jsi::Value> callbackValue
|
|
693
|
+
,uint64_t rs_data
|
|
694
|
+
,int8_t rs_pollResult) {
|
|
695
|
+
|
|
696
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
697
|
+
// We'll use the Bridging class to do this…
|
|
698
|
+
auto js_data = uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_data);
|
|
699
|
+
auto js_pollResult = uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, rs_pollResult);
|
|
700
|
+
|
|
701
|
+
// Now we are ready to call the callback.
|
|
702
|
+
// We are already on the JS thread, because this `body` function was
|
|
703
|
+
// invoked from the CallInvoker.
|
|
704
|
+
try {
|
|
705
|
+
// Getting the callback function
|
|
706
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
707
|
+
auto uniffiResult = cb.call(rt, js_data, js_pollResult
|
|
708
|
+
);
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
} catch (const jsi::JSError &error) {
|
|
714
|
+
std::cout << "Error in callback UniffiRustFutureContinuationCallback: "
|
|
715
|
+
<< error.what() << std::endl;
|
|
716
|
+
throw error;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
555
719
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
720
|
+
static void callback(uint64_t rs_data, int8_t rs_pollResult) {
|
|
721
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
722
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
723
|
+
//
|
|
724
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
725
|
+
// which nulls out the rsLamda.
|
|
726
|
+
//
|
|
727
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
728
|
+
if (rsLambda == nullptr) {
|
|
729
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
730
|
+
// which causes the JS callback to be dropped.
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
735
|
+
// are all in the lambda.
|
|
736
|
+
rsLambda(
|
|
737
|
+
rs_data,
|
|
738
|
+
rs_pollResult);
|
|
739
|
+
}
|
|
560
740
|
|
|
561
|
-
static UniffiRustFutureContinuationCallback
|
|
562
|
-
makeCallbackFunction( // uniffi::rusaint::cb::rustfuturecontinuationcallback
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
741
|
+
static UniffiRustFutureContinuationCallback
|
|
742
|
+
makeCallbackFunction( // uniffi::rusaint::cb::rustfuturecontinuationcallback
|
|
743
|
+
jsi::Runtime &rt,
|
|
744
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
745
|
+
const jsi::Value &value) {
|
|
746
|
+
if (rsLambda != nullptr) {
|
|
747
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
748
|
+
//
|
|
749
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
750
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
751
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
752
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
753
|
+
//
|
|
754
|
+
// We can therefore return the callback function without making anything
|
|
755
|
+
// new if we've been initialized already.
|
|
756
|
+
return callback;
|
|
757
|
+
}
|
|
758
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
759
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
760
|
+
rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_data, int8_t rs_pollResult) {
|
|
761
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
762
|
+
// arguments into JSI values and calling the callback.
|
|
763
|
+
uniffi_runtime::UniffiCallFunc jsLambda = [
|
|
764
|
+
callInvoker,
|
|
765
|
+
callbackValue
|
|
766
|
+
, rs_data
|
|
767
|
+
, rs_pollResult](jsi::Runtime &rt) mutable {
|
|
768
|
+
body(rt, callInvoker, callbackValue
|
|
769
|
+
, rs_data
|
|
770
|
+
, rs_pollResult);
|
|
771
|
+
};
|
|
772
|
+
// We'll then call that lambda from the callInvoker which will
|
|
773
|
+
// look after calling it on the correct thread.
|
|
774
|
+
|
|
775
|
+
callInvoker->invokeNonBlocking(rt, jsLambda);
|
|
588
776
|
};
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
callInvoker->invokeNonBlocking(rt, jsLambda);
|
|
593
|
-
};
|
|
594
|
-
return callback;
|
|
595
|
-
}
|
|
777
|
+
return callback;
|
|
778
|
+
}
|
|
596
779
|
|
|
597
|
-
// This method is called from the destructor of NativeRusaint, which only
|
|
598
|
-
//
|
|
599
|
-
static void cleanup() {
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
}
|
|
780
|
+
// This method is called from the destructor of NativeRusaint, which only happens
|
|
781
|
+
// when the jsi::Runtime is being destroyed.
|
|
782
|
+
static void cleanup() {
|
|
783
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled out,
|
|
784
|
+
// then the pointer will no longer be left dangling.
|
|
785
|
+
rsLambda = nullptr;
|
|
786
|
+
}
|
|
604
787
|
} // namespace uniffi::rusaint::cb::rustfuturecontinuationcallback
|
|
605
|
-
|
|
606
|
-
|
|
788
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureFree,
|
|
789
|
+
// passed from Rust to JS as part of async callbacks.
|
|
607
790
|
namespace uniffi::rusaint {
|
|
608
791
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
609
792
|
|
|
610
793
|
template <> struct Bridging<UniffiForeignFutureFree> {
|
|
611
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
612
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
613
|
-
UniffiForeignFutureFree rsCallback) {
|
|
794
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureFree rsCallback) {
|
|
614
795
|
return jsi::Function::createFromHostFunction(
|
|
615
|
-
rt,
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
796
|
+
rt,
|
|
797
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"),
|
|
798
|
+
1,
|
|
799
|
+
[rsCallback, callInvoker](
|
|
800
|
+
jsi::Runtime &rt,
|
|
801
|
+
const jsi::Value &thisValue,
|
|
802
|
+
const jsi::Value *arguments,
|
|
803
|
+
size_t count) -> jsi::Value
|
|
804
|
+
{
|
|
805
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
806
|
+
}
|
|
807
|
+
);
|
|
622
808
|
}
|
|
623
809
|
|
|
624
|
-
static jsi::Value intoRust(
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
810
|
+
static jsi::Value intoRust(
|
|
811
|
+
jsi::Runtime &rt,
|
|
812
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
813
|
+
const jsi::Value &thisValue,
|
|
814
|
+
const jsi::Value *args,
|
|
815
|
+
size_t count,
|
|
816
|
+
UniffiForeignFutureFree func) {
|
|
629
817
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
630
818
|
// then call the rs_callback with those arguments.
|
|
631
|
-
|
|
819
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0])
|
|
820
|
+
);
|
|
632
821
|
|
|
633
|
-
|
|
822
|
+
|
|
823
|
+
return jsi::Value::undefined();
|
|
634
824
|
}
|
|
635
825
|
};
|
|
636
826
|
} // namespace uniffi::rusaint
|
|
637
|
-
|
|
827
|
+
// Implementation of free callback function CallbackInterfaceFree
|
|
638
828
|
|
|
639
|
-
|
|
640
|
-
// uniffi::rusaint::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree
|
|
829
|
+
|
|
830
|
+
// Callback function: uniffi::rusaint::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree
|
|
641
831
|
//
|
|
642
832
|
// We have the following constraints:
|
|
643
833
|
// - we need to pass a function pointer to Rust.
|
|
644
834
|
// - we need a jsi::Runtime and jsi::Function to call into JS.
|
|
645
835
|
// - function pointers can't store state, so we can't use a lamda.
|
|
646
836
|
//
|
|
647
|
-
// For this, we store a lambda as a global, as `rsLambda`. The `callback`
|
|
648
|
-
//
|
|
649
|
-
// into JS.
|
|
837
|
+
// For this, we store a lambda as a global, as `rsLambda`. The `callback` function calls
|
|
838
|
+
// the lambda, which itself calls the `body` which then calls into JS.
|
|
650
839
|
//
|
|
651
|
-
// We then give the `callback` function pointer to Rust which will call the
|
|
652
|
-
//
|
|
840
|
+
// We then give the `callback` function pointer to Rust which will call the lambda sometime in the
|
|
841
|
+
// future.
|
|
653
842
|
namespace uniffi::rusaint::st::foreignfuture::foreignfuture::free {
|
|
654
|
-
using namespace facebook;
|
|
655
|
-
|
|
656
|
-
// We need to store a lambda in a global so we can call it from
|
|
657
|
-
// a function pointer. The function pointer is passed to Rust.
|
|
658
|
-
static std::function<void(uint64_t)> rsLambda = nullptr;
|
|
659
|
-
|
|
660
|
-
// This is the main body of the callback. It's called from the lambda,
|
|
661
|
-
// which itself is called from the callback function which is passed to Rust.
|
|
662
|
-
static void body(jsi::Runtime &rt,
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
690
|
-
//
|
|
691
|
-
// Answer: the module destructor calls into callback `cleanup` method,
|
|
692
|
-
// which nulls out the rsLamda.
|
|
693
|
-
//
|
|
694
|
-
// If rsLamda is null, then there is no runtime to call into.
|
|
695
|
-
if (rsLambda == nullptr) {
|
|
696
|
-
// This only occurs when destructors are calling into Rust free/drop,
|
|
697
|
-
// which causes the JS callback to be dropped.
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
843
|
+
using namespace facebook;
|
|
844
|
+
|
|
845
|
+
// We need to store a lambda in a global so we can call it from
|
|
846
|
+
// a function pointer. The function pointer is passed to Rust.
|
|
847
|
+
static std::function<void(uint64_t)> rsLambda = nullptr;
|
|
848
|
+
|
|
849
|
+
// This is the main body of the callback. It's called from the lambda,
|
|
850
|
+
// which itself is called from the callback function which is passed to Rust.
|
|
851
|
+
static void body(jsi::Runtime &rt,
|
|
852
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
853
|
+
std::shared_ptr<jsi::Value> callbackValue
|
|
854
|
+
,uint64_t rs_handle) {
|
|
855
|
+
|
|
856
|
+
// Convert the arguments from Rust, into jsi::Values.
|
|
857
|
+
// We'll use the Bridging class to do this…
|
|
858
|
+
auto js_handle = uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
|
|
859
|
+
|
|
860
|
+
// Now we are ready to call the callback.
|
|
861
|
+
// We are already on the JS thread, because this `body` function was
|
|
862
|
+
// invoked from the CallInvoker.
|
|
863
|
+
try {
|
|
864
|
+
// Getting the callback function
|
|
865
|
+
auto cb = callbackValue->asObject(rt).asFunction(rt);
|
|
866
|
+
auto uniffiResult = cb.call(rt, js_handle
|
|
867
|
+
);
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
} catch (const jsi::JSError &error) {
|
|
873
|
+
std::cout << "Error in callback UniffiCallbackInterfaceFree: "
|
|
874
|
+
<< error.what() << std::endl;
|
|
875
|
+
throw error;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
700
878
|
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
879
|
+
static void callback(uint64_t rs_handle) {
|
|
880
|
+
// If the runtime has shutdown, then there is no point in trying to
|
|
881
|
+
// call into Javascript. BUT how do we tell if the runtime has shutdown?
|
|
882
|
+
//
|
|
883
|
+
// Answer: the module destructor calls into callback `cleanup` method,
|
|
884
|
+
// which nulls out the rsLamda.
|
|
885
|
+
//
|
|
886
|
+
// If rsLamda is null, then there is no runtime to call into.
|
|
887
|
+
if (rsLambda == nullptr) {
|
|
888
|
+
// This only occurs when destructors are calling into Rust free/drop,
|
|
889
|
+
// which causes the JS callback to be dropped.
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// The runtime, the actual callback jsi::funtion, and the callInvoker
|
|
894
|
+
// are all in the lambda.
|
|
895
|
+
rsLambda(
|
|
896
|
+
rs_handle);
|
|
897
|
+
}
|
|
705
898
|
|
|
706
|
-
static UniffiCallbackInterfaceFree
|
|
707
|
-
makeCallbackFunction( // uniffi::rusaint::st::foreignfuture::foreignfuture::free
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
899
|
+
static UniffiCallbackInterfaceFree
|
|
900
|
+
makeCallbackFunction( // uniffi::rusaint::st::foreignfuture::foreignfuture::free
|
|
901
|
+
jsi::Runtime &rt,
|
|
902
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
|
|
903
|
+
const jsi::Value &value) {
|
|
904
|
+
if (rsLambda != nullptr) {
|
|
905
|
+
// `makeCallbackFunction` is called in two circumstances:
|
|
906
|
+
//
|
|
907
|
+
// 1. at startup, when initializing callback interface vtables.
|
|
908
|
+
// 2. when polling futures. This happens at least once per future that is
|
|
909
|
+
// exposed to Javascript. We know that this is always the same function,
|
|
910
|
+
// `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
|
|
911
|
+
//
|
|
912
|
+
// We can therefore return the callback function without making anything
|
|
913
|
+
// new if we've been initialized already.
|
|
914
|
+
return callback;
|
|
915
|
+
}
|
|
916
|
+
auto callbackFunction = value.asObject(rt).asFunction(rt);
|
|
917
|
+
auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
|
|
918
|
+
rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
|
|
919
|
+
// We immediately make a lambda which will do the work of transforming the
|
|
920
|
+
// arguments into JSI values and calling the callback.
|
|
921
|
+
uniffi_runtime::UniffiCallFunc jsLambda = [
|
|
922
|
+
callInvoker,
|
|
923
|
+
callbackValue
|
|
924
|
+
, rs_handle](jsi::Runtime &rt) mutable {
|
|
925
|
+
body(rt, callInvoker, callbackValue
|
|
926
|
+
, rs_handle);
|
|
927
|
+
};
|
|
928
|
+
// We'll then call that lambda from the callInvoker which will
|
|
929
|
+
// look after calling it on the correct thread.
|
|
930
|
+
|
|
931
|
+
callInvoker->invokeNonBlocking(rt, jsLambda);
|
|
731
932
|
};
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
callInvoker->invokeNonBlocking(rt, jsLambda);
|
|
736
|
-
};
|
|
737
|
-
return callback;
|
|
738
|
-
}
|
|
933
|
+
return callback;
|
|
934
|
+
}
|
|
739
935
|
|
|
740
|
-
// This method is called from the destructor of NativeRusaint, which only
|
|
741
|
-
//
|
|
742
|
-
static void cleanup() {
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
}
|
|
936
|
+
// This method is called from the destructor of NativeRusaint, which only happens
|
|
937
|
+
// when the jsi::Runtime is being destroyed.
|
|
938
|
+
static void cleanup() {
|
|
939
|
+
// The lambda holds a reference to the the Runtime, so when this is nulled out,
|
|
940
|
+
// then the pointer will no longer be left dangling.
|
|
941
|
+
rsLambda = nullptr;
|
|
942
|
+
}
|
|
747
943
|
} // namespace uniffi::rusaint::st::foreignfuture::foreignfuture::free
|
|
748
944
|
namespace uniffi::rusaint {
|
|
749
945
|
using namespace facebook;
|
|
@@ -751,8 +947,9 @@ using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
|
751
947
|
|
|
752
948
|
template <> struct Bridging<UniffiForeignFuture> {
|
|
753
949
|
static UniffiForeignFuture fromJs(jsi::Runtime &rt,
|
|
754
|
-
|
|
755
|
-
|
|
950
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
951
|
+
const jsi::Value &jsValue
|
|
952
|
+
) {
|
|
756
953
|
// Check if the input is an object
|
|
757
954
|
if (!jsValue.isObject()) {
|
|
758
955
|
throw jsi::JSError(rt, "Expected an object for UniffiForeignFuture");
|
|
@@ -766,9 +963,12 @@ template <> struct Bridging<UniffiForeignFuture> {
|
|
|
766
963
|
|
|
767
964
|
// Create the vtable from the js callbacks.
|
|
768
965
|
rsObject.handle = uniffi_jsi::Bridging<uint64_t>::fromJs(
|
|
769
|
-
rt, callInvoker,
|
|
770
|
-
|
|
771
|
-
|
|
966
|
+
rt, callInvoker,
|
|
967
|
+
jsObject.getProperty(rt, "handle")
|
|
968
|
+
);
|
|
969
|
+
rsObject.free = uniffi::rusaint::st::foreignfuture::foreignfuture::free::makeCallbackFunction(
|
|
970
|
+
rt, callInvoker, jsObject.getProperty(rt, "free")
|
|
971
|
+
);
|
|
772
972
|
|
|
773
973
|
return rsObject;
|
|
774
974
|
}
|
|
@@ -780,13 +980,13 @@ using namespace facebook;
|
|
|
780
980
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
781
981
|
|
|
782
982
|
template <> struct Bridging<UniffiForeignFutureStructU8> {
|
|
783
|
-
static UniffiForeignFutureStructU8
|
|
784
|
-
|
|
785
|
-
|
|
983
|
+
static UniffiForeignFutureStructU8 fromJs(jsi::Runtime &rt,
|
|
984
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
985
|
+
const jsi::Value &jsValue
|
|
986
|
+
) {
|
|
786
987
|
// Check if the input is an object
|
|
787
988
|
if (!jsValue.isObject()) {
|
|
788
|
-
throw jsi::JSError(rt,
|
|
789
|
-
"Expected an object for UniffiForeignFutureStructU8");
|
|
989
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU8");
|
|
790
990
|
}
|
|
791
991
|
|
|
792
992
|
// Get the object from the jsi::Value
|
|
@@ -797,46 +997,55 @@ template <> struct Bridging<UniffiForeignFutureStructU8> {
|
|
|
797
997
|
|
|
798
998
|
// Create the vtable from the js callbacks.
|
|
799
999
|
rsObject.return_value = uniffi_jsi::Bridging<uint8_t>::fromJs(
|
|
800
|
-
rt, callInvoker,
|
|
1000
|
+
rt, callInvoker,
|
|
1001
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1002
|
+
);
|
|
801
1003
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
802
|
-
rt, callInvoker,
|
|
1004
|
+
rt, callInvoker,
|
|
1005
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1006
|
+
);
|
|
803
1007
|
|
|
804
1008
|
return rsObject;
|
|
805
1009
|
}
|
|
806
1010
|
};
|
|
807
1011
|
|
|
808
1012
|
} // namespace uniffi::rusaint
|
|
809
|
-
|
|
810
|
-
|
|
1013
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU8,
|
|
1014
|
+
// passed from Rust to JS as part of async callbacks.
|
|
811
1015
|
namespace uniffi::rusaint {
|
|
812
1016
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
813
1017
|
|
|
814
1018
|
template <> struct Bridging<UniffiForeignFutureCompleteU8> {
|
|
815
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
816
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
817
|
-
UniffiForeignFutureCompleteU8 rsCallback) {
|
|
1019
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU8 rsCallback) {
|
|
818
1020
|
return jsi::Function::createFromHostFunction(
|
|
819
|
-
rt,
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
1021
|
+
rt,
|
|
1022
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU8"),
|
|
1023
|
+
2,
|
|
1024
|
+
[rsCallback, callInvoker](
|
|
1025
|
+
jsi::Runtime &rt,
|
|
1026
|
+
const jsi::Value &thisValue,
|
|
1027
|
+
const jsi::Value *arguments,
|
|
1028
|
+
size_t count) -> jsi::Value
|
|
1029
|
+
{
|
|
1030
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1031
|
+
}
|
|
1032
|
+
);
|
|
826
1033
|
}
|
|
827
1034
|
|
|
828
|
-
static jsi::Value intoRust(
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
1035
|
+
static jsi::Value intoRust(
|
|
1036
|
+
jsi::Runtime &rt,
|
|
1037
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1038
|
+
const jsi::Value &thisValue,
|
|
1039
|
+
const jsi::Value *args,
|
|
1040
|
+
size_t count,
|
|
1041
|
+
UniffiForeignFutureCompleteU8 func) {
|
|
833
1042
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
834
1043
|
// then call the rs_callback with those arguments.
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
rt, callInvoker, args[1]));
|
|
1044
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructU8>::fromJs(rt, callInvoker, args[1])
|
|
1045
|
+
);
|
|
838
1046
|
|
|
839
|
-
|
|
1047
|
+
|
|
1048
|
+
return jsi::Value::undefined();
|
|
840
1049
|
}
|
|
841
1050
|
};
|
|
842
1051
|
} // namespace uniffi::rusaint
|
|
@@ -845,13 +1054,13 @@ using namespace facebook;
|
|
|
845
1054
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
846
1055
|
|
|
847
1056
|
template <> struct Bridging<UniffiForeignFutureStructI8> {
|
|
848
|
-
static UniffiForeignFutureStructI8
|
|
849
|
-
|
|
850
|
-
|
|
1057
|
+
static UniffiForeignFutureStructI8 fromJs(jsi::Runtime &rt,
|
|
1058
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1059
|
+
const jsi::Value &jsValue
|
|
1060
|
+
) {
|
|
851
1061
|
// Check if the input is an object
|
|
852
1062
|
if (!jsValue.isObject()) {
|
|
853
|
-
throw jsi::JSError(rt,
|
|
854
|
-
"Expected an object for UniffiForeignFutureStructI8");
|
|
1063
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI8");
|
|
855
1064
|
}
|
|
856
1065
|
|
|
857
1066
|
// Get the object from the jsi::Value
|
|
@@ -862,46 +1071,55 @@ template <> struct Bridging<UniffiForeignFutureStructI8> {
|
|
|
862
1071
|
|
|
863
1072
|
// Create the vtable from the js callbacks.
|
|
864
1073
|
rsObject.return_value = uniffi_jsi::Bridging<int8_t>::fromJs(
|
|
865
|
-
rt, callInvoker,
|
|
1074
|
+
rt, callInvoker,
|
|
1075
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1076
|
+
);
|
|
866
1077
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
867
|
-
rt, callInvoker,
|
|
1078
|
+
rt, callInvoker,
|
|
1079
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1080
|
+
);
|
|
868
1081
|
|
|
869
1082
|
return rsObject;
|
|
870
1083
|
}
|
|
871
1084
|
};
|
|
872
1085
|
|
|
873
1086
|
} // namespace uniffi::rusaint
|
|
874
|
-
|
|
875
|
-
|
|
1087
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI8,
|
|
1088
|
+
// passed from Rust to JS as part of async callbacks.
|
|
876
1089
|
namespace uniffi::rusaint {
|
|
877
1090
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
878
1091
|
|
|
879
1092
|
template <> struct Bridging<UniffiForeignFutureCompleteI8> {
|
|
880
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
881
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
882
|
-
UniffiForeignFutureCompleteI8 rsCallback) {
|
|
1093
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI8 rsCallback) {
|
|
883
1094
|
return jsi::Function::createFromHostFunction(
|
|
884
|
-
rt,
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
1095
|
+
rt,
|
|
1096
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI8"),
|
|
1097
|
+
2,
|
|
1098
|
+
[rsCallback, callInvoker](
|
|
1099
|
+
jsi::Runtime &rt,
|
|
1100
|
+
const jsi::Value &thisValue,
|
|
1101
|
+
const jsi::Value *arguments,
|
|
1102
|
+
size_t count) -> jsi::Value
|
|
1103
|
+
{
|
|
1104
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1105
|
+
}
|
|
1106
|
+
);
|
|
891
1107
|
}
|
|
892
1108
|
|
|
893
|
-
static jsi::Value intoRust(
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
1109
|
+
static jsi::Value intoRust(
|
|
1110
|
+
jsi::Runtime &rt,
|
|
1111
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1112
|
+
const jsi::Value &thisValue,
|
|
1113
|
+
const jsi::Value *args,
|
|
1114
|
+
size_t count,
|
|
1115
|
+
UniffiForeignFutureCompleteI8 func) {
|
|
898
1116
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
899
1117
|
// then call the rs_callback with those arguments.
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
rt, callInvoker, args[1]));
|
|
1118
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructI8>::fromJs(rt, callInvoker, args[1])
|
|
1119
|
+
);
|
|
903
1120
|
|
|
904
|
-
|
|
1121
|
+
|
|
1122
|
+
return jsi::Value::undefined();
|
|
905
1123
|
}
|
|
906
1124
|
};
|
|
907
1125
|
} // namespace uniffi::rusaint
|
|
@@ -910,13 +1128,13 @@ using namespace facebook;
|
|
|
910
1128
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
911
1129
|
|
|
912
1130
|
template <> struct Bridging<UniffiForeignFutureStructU16> {
|
|
913
|
-
static UniffiForeignFutureStructU16
|
|
914
|
-
|
|
915
|
-
|
|
1131
|
+
static UniffiForeignFutureStructU16 fromJs(jsi::Runtime &rt,
|
|
1132
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1133
|
+
const jsi::Value &jsValue
|
|
1134
|
+
) {
|
|
916
1135
|
// Check if the input is an object
|
|
917
1136
|
if (!jsValue.isObject()) {
|
|
918
|
-
throw jsi::JSError(rt,
|
|
919
|
-
"Expected an object for UniffiForeignFutureStructU16");
|
|
1137
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU16");
|
|
920
1138
|
}
|
|
921
1139
|
|
|
922
1140
|
// Get the object from the jsi::Value
|
|
@@ -927,47 +1145,55 @@ template <> struct Bridging<UniffiForeignFutureStructU16> {
|
|
|
927
1145
|
|
|
928
1146
|
// Create the vtable from the js callbacks.
|
|
929
1147
|
rsObject.return_value = uniffi_jsi::Bridging<uint16_t>::fromJs(
|
|
930
|
-
rt, callInvoker,
|
|
1148
|
+
rt, callInvoker,
|
|
1149
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1150
|
+
);
|
|
931
1151
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
932
|
-
rt, callInvoker,
|
|
1152
|
+
rt, callInvoker,
|
|
1153
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1154
|
+
);
|
|
933
1155
|
|
|
934
1156
|
return rsObject;
|
|
935
1157
|
}
|
|
936
1158
|
};
|
|
937
1159
|
|
|
938
1160
|
} // namespace uniffi::rusaint
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
// callbacks.
|
|
1161
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU16,
|
|
1162
|
+
// passed from Rust to JS as part of async callbacks.
|
|
942
1163
|
namespace uniffi::rusaint {
|
|
943
1164
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
944
1165
|
|
|
945
1166
|
template <> struct Bridging<UniffiForeignFutureCompleteU16> {
|
|
946
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
947
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
948
|
-
UniffiForeignFutureCompleteU16 rsCallback) {
|
|
1167
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU16 rsCallback) {
|
|
949
1168
|
return jsi::Function::createFromHostFunction(
|
|
950
|
-
rt,
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1169
|
+
rt,
|
|
1170
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU16"),
|
|
1171
|
+
2,
|
|
1172
|
+
[rsCallback, callInvoker](
|
|
1173
|
+
jsi::Runtime &rt,
|
|
1174
|
+
const jsi::Value &thisValue,
|
|
1175
|
+
const jsi::Value *arguments,
|
|
1176
|
+
size_t count) -> jsi::Value
|
|
1177
|
+
{
|
|
1178
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1179
|
+
}
|
|
1180
|
+
);
|
|
957
1181
|
}
|
|
958
1182
|
|
|
959
|
-
static jsi::Value intoRust(
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1183
|
+
static jsi::Value intoRust(
|
|
1184
|
+
jsi::Runtime &rt,
|
|
1185
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1186
|
+
const jsi::Value &thisValue,
|
|
1187
|
+
const jsi::Value *args,
|
|
1188
|
+
size_t count,
|
|
1189
|
+
UniffiForeignFutureCompleteU16 func) {
|
|
964
1190
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
965
1191
|
// then call the rs_callback with those arguments.
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
rt, callInvoker, args[1]));
|
|
1192
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructU16>::fromJs(rt, callInvoker, args[1])
|
|
1193
|
+
);
|
|
969
1194
|
|
|
970
|
-
|
|
1195
|
+
|
|
1196
|
+
return jsi::Value::undefined();
|
|
971
1197
|
}
|
|
972
1198
|
};
|
|
973
1199
|
} // namespace uniffi::rusaint
|
|
@@ -976,13 +1202,13 @@ using namespace facebook;
|
|
|
976
1202
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
977
1203
|
|
|
978
1204
|
template <> struct Bridging<UniffiForeignFutureStructI16> {
|
|
979
|
-
static UniffiForeignFutureStructI16
|
|
980
|
-
|
|
981
|
-
|
|
1205
|
+
static UniffiForeignFutureStructI16 fromJs(jsi::Runtime &rt,
|
|
1206
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1207
|
+
const jsi::Value &jsValue
|
|
1208
|
+
) {
|
|
982
1209
|
// Check if the input is an object
|
|
983
1210
|
if (!jsValue.isObject()) {
|
|
984
|
-
throw jsi::JSError(rt,
|
|
985
|
-
"Expected an object for UniffiForeignFutureStructI16");
|
|
1211
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI16");
|
|
986
1212
|
}
|
|
987
1213
|
|
|
988
1214
|
// Get the object from the jsi::Value
|
|
@@ -993,47 +1219,55 @@ template <> struct Bridging<UniffiForeignFutureStructI16> {
|
|
|
993
1219
|
|
|
994
1220
|
// Create the vtable from the js callbacks.
|
|
995
1221
|
rsObject.return_value = uniffi_jsi::Bridging<int16_t>::fromJs(
|
|
996
|
-
rt, callInvoker,
|
|
1222
|
+
rt, callInvoker,
|
|
1223
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1224
|
+
);
|
|
997
1225
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
998
|
-
rt, callInvoker,
|
|
1226
|
+
rt, callInvoker,
|
|
1227
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1228
|
+
);
|
|
999
1229
|
|
|
1000
1230
|
return rsObject;
|
|
1001
1231
|
}
|
|
1002
1232
|
};
|
|
1003
1233
|
|
|
1004
1234
|
} // namespace uniffi::rusaint
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
// callbacks.
|
|
1235
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI16,
|
|
1236
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1008
1237
|
namespace uniffi::rusaint {
|
|
1009
1238
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1010
1239
|
|
|
1011
1240
|
template <> struct Bridging<UniffiForeignFutureCompleteI16> {
|
|
1012
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1013
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1014
|
-
UniffiForeignFutureCompleteI16 rsCallback) {
|
|
1241
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI16 rsCallback) {
|
|
1015
1242
|
return jsi::Function::createFromHostFunction(
|
|
1016
|
-
rt,
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1243
|
+
rt,
|
|
1244
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI16"),
|
|
1245
|
+
2,
|
|
1246
|
+
[rsCallback, callInvoker](
|
|
1247
|
+
jsi::Runtime &rt,
|
|
1248
|
+
const jsi::Value &thisValue,
|
|
1249
|
+
const jsi::Value *arguments,
|
|
1250
|
+
size_t count) -> jsi::Value
|
|
1251
|
+
{
|
|
1252
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1253
|
+
}
|
|
1254
|
+
);
|
|
1023
1255
|
}
|
|
1024
1256
|
|
|
1025
|
-
static jsi::Value intoRust(
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1257
|
+
static jsi::Value intoRust(
|
|
1258
|
+
jsi::Runtime &rt,
|
|
1259
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1260
|
+
const jsi::Value &thisValue,
|
|
1261
|
+
const jsi::Value *args,
|
|
1262
|
+
size_t count,
|
|
1263
|
+
UniffiForeignFutureCompleteI16 func) {
|
|
1030
1264
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1031
1265
|
// then call the rs_callback with those arguments.
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
rt, callInvoker, args[1]));
|
|
1266
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructI16>::fromJs(rt, callInvoker, args[1])
|
|
1267
|
+
);
|
|
1035
1268
|
|
|
1036
|
-
|
|
1269
|
+
|
|
1270
|
+
return jsi::Value::undefined();
|
|
1037
1271
|
}
|
|
1038
1272
|
};
|
|
1039
1273
|
} // namespace uniffi::rusaint
|
|
@@ -1042,13 +1276,13 @@ using namespace facebook;
|
|
|
1042
1276
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1043
1277
|
|
|
1044
1278
|
template <> struct Bridging<UniffiForeignFutureStructU32> {
|
|
1045
|
-
static UniffiForeignFutureStructU32
|
|
1046
|
-
|
|
1047
|
-
|
|
1279
|
+
static UniffiForeignFutureStructU32 fromJs(jsi::Runtime &rt,
|
|
1280
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1281
|
+
const jsi::Value &jsValue
|
|
1282
|
+
) {
|
|
1048
1283
|
// Check if the input is an object
|
|
1049
1284
|
if (!jsValue.isObject()) {
|
|
1050
|
-
throw jsi::JSError(rt,
|
|
1051
|
-
"Expected an object for UniffiForeignFutureStructU32");
|
|
1285
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU32");
|
|
1052
1286
|
}
|
|
1053
1287
|
|
|
1054
1288
|
// Get the object from the jsi::Value
|
|
@@ -1059,47 +1293,55 @@ template <> struct Bridging<UniffiForeignFutureStructU32> {
|
|
|
1059
1293
|
|
|
1060
1294
|
// Create the vtable from the js callbacks.
|
|
1061
1295
|
rsObject.return_value = uniffi_jsi::Bridging<uint32_t>::fromJs(
|
|
1062
|
-
rt, callInvoker,
|
|
1296
|
+
rt, callInvoker,
|
|
1297
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1298
|
+
);
|
|
1063
1299
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1064
|
-
rt, callInvoker,
|
|
1300
|
+
rt, callInvoker,
|
|
1301
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1302
|
+
);
|
|
1065
1303
|
|
|
1066
1304
|
return rsObject;
|
|
1067
1305
|
}
|
|
1068
1306
|
};
|
|
1069
1307
|
|
|
1070
1308
|
} // namespace uniffi::rusaint
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
// callbacks.
|
|
1309
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU32,
|
|
1310
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1074
1311
|
namespace uniffi::rusaint {
|
|
1075
1312
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1076
1313
|
|
|
1077
1314
|
template <> struct Bridging<UniffiForeignFutureCompleteU32> {
|
|
1078
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1079
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1080
|
-
UniffiForeignFutureCompleteU32 rsCallback) {
|
|
1315
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU32 rsCallback) {
|
|
1081
1316
|
return jsi::Function::createFromHostFunction(
|
|
1082
|
-
rt,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1317
|
+
rt,
|
|
1318
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU32"),
|
|
1319
|
+
2,
|
|
1320
|
+
[rsCallback, callInvoker](
|
|
1321
|
+
jsi::Runtime &rt,
|
|
1322
|
+
const jsi::Value &thisValue,
|
|
1323
|
+
const jsi::Value *arguments,
|
|
1324
|
+
size_t count) -> jsi::Value
|
|
1325
|
+
{
|
|
1326
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1327
|
+
}
|
|
1328
|
+
);
|
|
1089
1329
|
}
|
|
1090
1330
|
|
|
1091
|
-
static jsi::Value intoRust(
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1331
|
+
static jsi::Value intoRust(
|
|
1332
|
+
jsi::Runtime &rt,
|
|
1333
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1334
|
+
const jsi::Value &thisValue,
|
|
1335
|
+
const jsi::Value *args,
|
|
1336
|
+
size_t count,
|
|
1337
|
+
UniffiForeignFutureCompleteU32 func) {
|
|
1096
1338
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1097
1339
|
// then call the rs_callback with those arguments.
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
rt, callInvoker, args[1]));
|
|
1340
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructU32>::fromJs(rt, callInvoker, args[1])
|
|
1341
|
+
);
|
|
1101
1342
|
|
|
1102
|
-
|
|
1343
|
+
|
|
1344
|
+
return jsi::Value::undefined();
|
|
1103
1345
|
}
|
|
1104
1346
|
};
|
|
1105
1347
|
} // namespace uniffi::rusaint
|
|
@@ -1108,13 +1350,13 @@ using namespace facebook;
|
|
|
1108
1350
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1109
1351
|
|
|
1110
1352
|
template <> struct Bridging<UniffiForeignFutureStructI32> {
|
|
1111
|
-
static UniffiForeignFutureStructI32
|
|
1112
|
-
|
|
1113
|
-
|
|
1353
|
+
static UniffiForeignFutureStructI32 fromJs(jsi::Runtime &rt,
|
|
1354
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1355
|
+
const jsi::Value &jsValue
|
|
1356
|
+
) {
|
|
1114
1357
|
// Check if the input is an object
|
|
1115
1358
|
if (!jsValue.isObject()) {
|
|
1116
|
-
throw jsi::JSError(rt,
|
|
1117
|
-
"Expected an object for UniffiForeignFutureStructI32");
|
|
1359
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI32");
|
|
1118
1360
|
}
|
|
1119
1361
|
|
|
1120
1362
|
// Get the object from the jsi::Value
|
|
@@ -1125,47 +1367,55 @@ template <> struct Bridging<UniffiForeignFutureStructI32> {
|
|
|
1125
1367
|
|
|
1126
1368
|
// Create the vtable from the js callbacks.
|
|
1127
1369
|
rsObject.return_value = uniffi_jsi::Bridging<int32_t>::fromJs(
|
|
1128
|
-
rt, callInvoker,
|
|
1370
|
+
rt, callInvoker,
|
|
1371
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1372
|
+
);
|
|
1129
1373
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1130
|
-
rt, callInvoker,
|
|
1374
|
+
rt, callInvoker,
|
|
1375
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1376
|
+
);
|
|
1131
1377
|
|
|
1132
1378
|
return rsObject;
|
|
1133
1379
|
}
|
|
1134
1380
|
};
|
|
1135
1381
|
|
|
1136
1382
|
} // namespace uniffi::rusaint
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
// callbacks.
|
|
1383
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI32,
|
|
1384
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1140
1385
|
namespace uniffi::rusaint {
|
|
1141
1386
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1142
1387
|
|
|
1143
1388
|
template <> struct Bridging<UniffiForeignFutureCompleteI32> {
|
|
1144
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1145
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1146
|
-
UniffiForeignFutureCompleteI32 rsCallback) {
|
|
1389
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI32 rsCallback) {
|
|
1147
1390
|
return jsi::Function::createFromHostFunction(
|
|
1148
|
-
rt,
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1391
|
+
rt,
|
|
1392
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI32"),
|
|
1393
|
+
2,
|
|
1394
|
+
[rsCallback, callInvoker](
|
|
1395
|
+
jsi::Runtime &rt,
|
|
1396
|
+
const jsi::Value &thisValue,
|
|
1397
|
+
const jsi::Value *arguments,
|
|
1398
|
+
size_t count) -> jsi::Value
|
|
1399
|
+
{
|
|
1400
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1401
|
+
}
|
|
1402
|
+
);
|
|
1155
1403
|
}
|
|
1156
1404
|
|
|
1157
|
-
static jsi::Value intoRust(
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1405
|
+
static jsi::Value intoRust(
|
|
1406
|
+
jsi::Runtime &rt,
|
|
1407
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1408
|
+
const jsi::Value &thisValue,
|
|
1409
|
+
const jsi::Value *args,
|
|
1410
|
+
size_t count,
|
|
1411
|
+
UniffiForeignFutureCompleteI32 func) {
|
|
1162
1412
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1163
1413
|
// then call the rs_callback with those arguments.
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
rt, callInvoker, args[1]));
|
|
1414
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructI32>::fromJs(rt, callInvoker, args[1])
|
|
1415
|
+
);
|
|
1167
1416
|
|
|
1168
|
-
|
|
1417
|
+
|
|
1418
|
+
return jsi::Value::undefined();
|
|
1169
1419
|
}
|
|
1170
1420
|
};
|
|
1171
1421
|
} // namespace uniffi::rusaint
|
|
@@ -1174,13 +1424,13 @@ using namespace facebook;
|
|
|
1174
1424
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1175
1425
|
|
|
1176
1426
|
template <> struct Bridging<UniffiForeignFutureStructU64> {
|
|
1177
|
-
static UniffiForeignFutureStructU64
|
|
1178
|
-
|
|
1179
|
-
|
|
1427
|
+
static UniffiForeignFutureStructU64 fromJs(jsi::Runtime &rt,
|
|
1428
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1429
|
+
const jsi::Value &jsValue
|
|
1430
|
+
) {
|
|
1180
1431
|
// Check if the input is an object
|
|
1181
1432
|
if (!jsValue.isObject()) {
|
|
1182
|
-
throw jsi::JSError(rt,
|
|
1183
|
-
"Expected an object for UniffiForeignFutureStructU64");
|
|
1433
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructU64");
|
|
1184
1434
|
}
|
|
1185
1435
|
|
|
1186
1436
|
// Get the object from the jsi::Value
|
|
@@ -1191,47 +1441,55 @@ template <> struct Bridging<UniffiForeignFutureStructU64> {
|
|
|
1191
1441
|
|
|
1192
1442
|
// Create the vtable from the js callbacks.
|
|
1193
1443
|
rsObject.return_value = uniffi_jsi::Bridging<uint64_t>::fromJs(
|
|
1194
|
-
rt, callInvoker,
|
|
1444
|
+
rt, callInvoker,
|
|
1445
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1446
|
+
);
|
|
1195
1447
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1196
|
-
rt, callInvoker,
|
|
1448
|
+
rt, callInvoker,
|
|
1449
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1450
|
+
);
|
|
1197
1451
|
|
|
1198
1452
|
return rsObject;
|
|
1199
1453
|
}
|
|
1200
1454
|
};
|
|
1201
1455
|
|
|
1202
1456
|
} // namespace uniffi::rusaint
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
// callbacks.
|
|
1457
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteU64,
|
|
1458
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1206
1459
|
namespace uniffi::rusaint {
|
|
1207
1460
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1208
1461
|
|
|
1209
1462
|
template <> struct Bridging<UniffiForeignFutureCompleteU64> {
|
|
1210
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1211
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1212
|
-
UniffiForeignFutureCompleteU64 rsCallback) {
|
|
1463
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteU64 rsCallback) {
|
|
1213
1464
|
return jsi::Function::createFromHostFunction(
|
|
1214
|
-
rt,
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1465
|
+
rt,
|
|
1466
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU64"),
|
|
1467
|
+
2,
|
|
1468
|
+
[rsCallback, callInvoker](
|
|
1469
|
+
jsi::Runtime &rt,
|
|
1470
|
+
const jsi::Value &thisValue,
|
|
1471
|
+
const jsi::Value *arguments,
|
|
1472
|
+
size_t count) -> jsi::Value
|
|
1473
|
+
{
|
|
1474
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1475
|
+
}
|
|
1476
|
+
);
|
|
1221
1477
|
}
|
|
1222
1478
|
|
|
1223
|
-
static jsi::Value intoRust(
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1479
|
+
static jsi::Value intoRust(
|
|
1480
|
+
jsi::Runtime &rt,
|
|
1481
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1482
|
+
const jsi::Value &thisValue,
|
|
1483
|
+
const jsi::Value *args,
|
|
1484
|
+
size_t count,
|
|
1485
|
+
UniffiForeignFutureCompleteU64 func) {
|
|
1228
1486
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1229
1487
|
// then call the rs_callback with those arguments.
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
rt, callInvoker, args[1]));
|
|
1488
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructU64>::fromJs(rt, callInvoker, args[1])
|
|
1489
|
+
);
|
|
1233
1490
|
|
|
1234
|
-
|
|
1491
|
+
|
|
1492
|
+
return jsi::Value::undefined();
|
|
1235
1493
|
}
|
|
1236
1494
|
};
|
|
1237
1495
|
} // namespace uniffi::rusaint
|
|
@@ -1240,13 +1498,13 @@ using namespace facebook;
|
|
|
1240
1498
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1241
1499
|
|
|
1242
1500
|
template <> struct Bridging<UniffiForeignFutureStructI64> {
|
|
1243
|
-
static UniffiForeignFutureStructI64
|
|
1244
|
-
|
|
1245
|
-
|
|
1501
|
+
static UniffiForeignFutureStructI64 fromJs(jsi::Runtime &rt,
|
|
1502
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1503
|
+
const jsi::Value &jsValue
|
|
1504
|
+
) {
|
|
1246
1505
|
// Check if the input is an object
|
|
1247
1506
|
if (!jsValue.isObject()) {
|
|
1248
|
-
throw jsi::JSError(rt,
|
|
1249
|
-
"Expected an object for UniffiForeignFutureStructI64");
|
|
1507
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructI64");
|
|
1250
1508
|
}
|
|
1251
1509
|
|
|
1252
1510
|
// Get the object from the jsi::Value
|
|
@@ -1257,47 +1515,55 @@ template <> struct Bridging<UniffiForeignFutureStructI64> {
|
|
|
1257
1515
|
|
|
1258
1516
|
// Create the vtable from the js callbacks.
|
|
1259
1517
|
rsObject.return_value = uniffi_jsi::Bridging<int64_t>::fromJs(
|
|
1260
|
-
rt, callInvoker,
|
|
1518
|
+
rt, callInvoker,
|
|
1519
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1520
|
+
);
|
|
1261
1521
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1262
|
-
rt, callInvoker,
|
|
1522
|
+
rt, callInvoker,
|
|
1523
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1524
|
+
);
|
|
1263
1525
|
|
|
1264
1526
|
return rsObject;
|
|
1265
1527
|
}
|
|
1266
1528
|
};
|
|
1267
1529
|
|
|
1268
1530
|
} // namespace uniffi::rusaint
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
// callbacks.
|
|
1531
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteI64,
|
|
1532
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1272
1533
|
namespace uniffi::rusaint {
|
|
1273
1534
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1274
1535
|
|
|
1275
1536
|
template <> struct Bridging<UniffiForeignFutureCompleteI64> {
|
|
1276
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1277
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1278
|
-
UniffiForeignFutureCompleteI64 rsCallback) {
|
|
1537
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteI64 rsCallback) {
|
|
1279
1538
|
return jsi::Function::createFromHostFunction(
|
|
1280
|
-
rt,
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1539
|
+
rt,
|
|
1540
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI64"),
|
|
1541
|
+
2,
|
|
1542
|
+
[rsCallback, callInvoker](
|
|
1543
|
+
jsi::Runtime &rt,
|
|
1544
|
+
const jsi::Value &thisValue,
|
|
1545
|
+
const jsi::Value *arguments,
|
|
1546
|
+
size_t count) -> jsi::Value
|
|
1547
|
+
{
|
|
1548
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1549
|
+
}
|
|
1550
|
+
);
|
|
1287
1551
|
}
|
|
1288
1552
|
|
|
1289
|
-
static jsi::Value intoRust(
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1553
|
+
static jsi::Value intoRust(
|
|
1554
|
+
jsi::Runtime &rt,
|
|
1555
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1556
|
+
const jsi::Value &thisValue,
|
|
1557
|
+
const jsi::Value *args,
|
|
1558
|
+
size_t count,
|
|
1559
|
+
UniffiForeignFutureCompleteI64 func) {
|
|
1294
1560
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1295
1561
|
// then call the rs_callback with those arguments.
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
rt, callInvoker, args[1]));
|
|
1562
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructI64>::fromJs(rt, callInvoker, args[1])
|
|
1563
|
+
);
|
|
1299
1564
|
|
|
1300
|
-
|
|
1565
|
+
|
|
1566
|
+
return jsi::Value::undefined();
|
|
1301
1567
|
}
|
|
1302
1568
|
};
|
|
1303
1569
|
} // namespace uniffi::rusaint
|
|
@@ -1306,13 +1572,13 @@ using namespace facebook;
|
|
|
1306
1572
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1307
1573
|
|
|
1308
1574
|
template <> struct Bridging<UniffiForeignFutureStructF32> {
|
|
1309
|
-
static UniffiForeignFutureStructF32
|
|
1310
|
-
|
|
1311
|
-
|
|
1575
|
+
static UniffiForeignFutureStructF32 fromJs(jsi::Runtime &rt,
|
|
1576
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1577
|
+
const jsi::Value &jsValue
|
|
1578
|
+
) {
|
|
1312
1579
|
// Check if the input is an object
|
|
1313
1580
|
if (!jsValue.isObject()) {
|
|
1314
|
-
throw jsi::JSError(rt,
|
|
1315
|
-
"Expected an object for UniffiForeignFutureStructF32");
|
|
1581
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructF32");
|
|
1316
1582
|
}
|
|
1317
1583
|
|
|
1318
1584
|
// Get the object from the jsi::Value
|
|
@@ -1323,47 +1589,55 @@ template <> struct Bridging<UniffiForeignFutureStructF32> {
|
|
|
1323
1589
|
|
|
1324
1590
|
// Create the vtable from the js callbacks.
|
|
1325
1591
|
rsObject.return_value = uniffi_jsi::Bridging<float>::fromJs(
|
|
1326
|
-
rt, callInvoker,
|
|
1592
|
+
rt, callInvoker,
|
|
1593
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1594
|
+
);
|
|
1327
1595
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1328
|
-
rt, callInvoker,
|
|
1596
|
+
rt, callInvoker,
|
|
1597
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1598
|
+
);
|
|
1329
1599
|
|
|
1330
1600
|
return rsObject;
|
|
1331
1601
|
}
|
|
1332
1602
|
};
|
|
1333
1603
|
|
|
1334
1604
|
} // namespace uniffi::rusaint
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
// callbacks.
|
|
1605
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteF32,
|
|
1606
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1338
1607
|
namespace uniffi::rusaint {
|
|
1339
1608
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1340
1609
|
|
|
1341
1610
|
template <> struct Bridging<UniffiForeignFutureCompleteF32> {
|
|
1342
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1343
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1344
|
-
UniffiForeignFutureCompleteF32 rsCallback) {
|
|
1611
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteF32 rsCallback) {
|
|
1345
1612
|
return jsi::Function::createFromHostFunction(
|
|
1346
|
-
rt,
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1613
|
+
rt,
|
|
1614
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF32"),
|
|
1615
|
+
2,
|
|
1616
|
+
[rsCallback, callInvoker](
|
|
1617
|
+
jsi::Runtime &rt,
|
|
1618
|
+
const jsi::Value &thisValue,
|
|
1619
|
+
const jsi::Value *arguments,
|
|
1620
|
+
size_t count) -> jsi::Value
|
|
1621
|
+
{
|
|
1622
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1623
|
+
}
|
|
1624
|
+
);
|
|
1353
1625
|
}
|
|
1354
1626
|
|
|
1355
|
-
static jsi::Value intoRust(
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1627
|
+
static jsi::Value intoRust(
|
|
1628
|
+
jsi::Runtime &rt,
|
|
1629
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1630
|
+
const jsi::Value &thisValue,
|
|
1631
|
+
const jsi::Value *args,
|
|
1632
|
+
size_t count,
|
|
1633
|
+
UniffiForeignFutureCompleteF32 func) {
|
|
1360
1634
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1361
1635
|
// then call the rs_callback with those arguments.
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
rt, callInvoker, args[1]));
|
|
1636
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructF32>::fromJs(rt, callInvoker, args[1])
|
|
1637
|
+
);
|
|
1365
1638
|
|
|
1366
|
-
|
|
1639
|
+
|
|
1640
|
+
return jsi::Value::undefined();
|
|
1367
1641
|
}
|
|
1368
1642
|
};
|
|
1369
1643
|
} // namespace uniffi::rusaint
|
|
@@ -1372,13 +1646,13 @@ using namespace facebook;
|
|
|
1372
1646
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1373
1647
|
|
|
1374
1648
|
template <> struct Bridging<UniffiForeignFutureStructF64> {
|
|
1375
|
-
static UniffiForeignFutureStructF64
|
|
1376
|
-
|
|
1377
|
-
|
|
1649
|
+
static UniffiForeignFutureStructF64 fromJs(jsi::Runtime &rt,
|
|
1650
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1651
|
+
const jsi::Value &jsValue
|
|
1652
|
+
) {
|
|
1378
1653
|
// Check if the input is an object
|
|
1379
1654
|
if (!jsValue.isObject()) {
|
|
1380
|
-
throw jsi::JSError(rt,
|
|
1381
|
-
"Expected an object for UniffiForeignFutureStructF64");
|
|
1655
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructF64");
|
|
1382
1656
|
}
|
|
1383
1657
|
|
|
1384
1658
|
// Get the object from the jsi::Value
|
|
@@ -1389,47 +1663,55 @@ template <> struct Bridging<UniffiForeignFutureStructF64> {
|
|
|
1389
1663
|
|
|
1390
1664
|
// Create the vtable from the js callbacks.
|
|
1391
1665
|
rsObject.return_value = uniffi_jsi::Bridging<double>::fromJs(
|
|
1392
|
-
rt, callInvoker,
|
|
1666
|
+
rt, callInvoker,
|
|
1667
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1668
|
+
);
|
|
1393
1669
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1394
|
-
rt, callInvoker,
|
|
1670
|
+
rt, callInvoker,
|
|
1671
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1672
|
+
);
|
|
1395
1673
|
|
|
1396
1674
|
return rsObject;
|
|
1397
1675
|
}
|
|
1398
1676
|
};
|
|
1399
1677
|
|
|
1400
1678
|
} // namespace uniffi::rusaint
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
// callbacks.
|
|
1679
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteF64,
|
|
1680
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1404
1681
|
namespace uniffi::rusaint {
|
|
1405
1682
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1406
1683
|
|
|
1407
1684
|
template <> struct Bridging<UniffiForeignFutureCompleteF64> {
|
|
1408
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1409
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1410
|
-
UniffiForeignFutureCompleteF64 rsCallback) {
|
|
1685
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteF64 rsCallback) {
|
|
1411
1686
|
return jsi::Function::createFromHostFunction(
|
|
1412
|
-
rt,
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1687
|
+
rt,
|
|
1688
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF64"),
|
|
1689
|
+
2,
|
|
1690
|
+
[rsCallback, callInvoker](
|
|
1691
|
+
jsi::Runtime &rt,
|
|
1692
|
+
const jsi::Value &thisValue,
|
|
1693
|
+
const jsi::Value *arguments,
|
|
1694
|
+
size_t count) -> jsi::Value
|
|
1695
|
+
{
|
|
1696
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1697
|
+
}
|
|
1698
|
+
);
|
|
1419
1699
|
}
|
|
1420
1700
|
|
|
1421
|
-
static jsi::Value intoRust(
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1701
|
+
static jsi::Value intoRust(
|
|
1702
|
+
jsi::Runtime &rt,
|
|
1703
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1704
|
+
const jsi::Value &thisValue,
|
|
1705
|
+
const jsi::Value *args,
|
|
1706
|
+
size_t count,
|
|
1707
|
+
UniffiForeignFutureCompleteF64 func) {
|
|
1426
1708
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1427
1709
|
// then call the rs_callback with those arguments.
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
rt, callInvoker, args[1]));
|
|
1710
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructF64>::fromJs(rt, callInvoker, args[1])
|
|
1711
|
+
);
|
|
1431
1712
|
|
|
1432
|
-
|
|
1713
|
+
|
|
1714
|
+
return jsi::Value::undefined();
|
|
1433
1715
|
}
|
|
1434
1716
|
};
|
|
1435
1717
|
} // namespace uniffi::rusaint
|
|
@@ -1438,13 +1720,13 @@ using namespace facebook;
|
|
|
1438
1720
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1439
1721
|
|
|
1440
1722
|
template <> struct Bridging<UniffiForeignFutureStructPointer> {
|
|
1441
|
-
static UniffiForeignFutureStructPointer
|
|
1442
|
-
|
|
1443
|
-
|
|
1723
|
+
static UniffiForeignFutureStructPointer fromJs(jsi::Runtime &rt,
|
|
1724
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1725
|
+
const jsi::Value &jsValue
|
|
1726
|
+
) {
|
|
1444
1727
|
// Check if the input is an object
|
|
1445
1728
|
if (!jsValue.isObject()) {
|
|
1446
|
-
throw jsi::JSError(
|
|
1447
|
-
rt, "Expected an object for UniffiForeignFutureStructPointer");
|
|
1729
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructPointer");
|
|
1448
1730
|
}
|
|
1449
1731
|
|
|
1450
1732
|
// Get the object from the jsi::Value
|
|
@@ -1455,47 +1737,55 @@ template <> struct Bridging<UniffiForeignFutureStructPointer> {
|
|
|
1455
1737
|
|
|
1456
1738
|
// Create the vtable from the js callbacks.
|
|
1457
1739
|
rsObject.return_value = uniffi_jsi::Bridging<void *>::fromJs(
|
|
1458
|
-
rt, callInvoker,
|
|
1740
|
+
rt, callInvoker,
|
|
1741
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1742
|
+
);
|
|
1459
1743
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1460
|
-
rt, callInvoker,
|
|
1744
|
+
rt, callInvoker,
|
|
1745
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1746
|
+
);
|
|
1461
1747
|
|
|
1462
1748
|
return rsObject;
|
|
1463
1749
|
}
|
|
1464
1750
|
};
|
|
1465
1751
|
|
|
1466
1752
|
} // namespace uniffi::rusaint
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
// callbacks.
|
|
1753
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompletePointer,
|
|
1754
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1470
1755
|
namespace uniffi::rusaint {
|
|
1471
1756
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1472
1757
|
|
|
1473
1758
|
template <> struct Bridging<UniffiForeignFutureCompletePointer> {
|
|
1474
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1475
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1476
|
-
UniffiForeignFutureCompletePointer rsCallback) {
|
|
1759
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompletePointer rsCallback) {
|
|
1477
1760
|
return jsi::Function::createFromHostFunction(
|
|
1478
|
-
rt,
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1761
|
+
rt,
|
|
1762
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"),
|
|
1763
|
+
2,
|
|
1764
|
+
[rsCallback, callInvoker](
|
|
1765
|
+
jsi::Runtime &rt,
|
|
1766
|
+
const jsi::Value &thisValue,
|
|
1767
|
+
const jsi::Value *arguments,
|
|
1768
|
+
size_t count) -> jsi::Value
|
|
1769
|
+
{
|
|
1770
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1771
|
+
}
|
|
1772
|
+
);
|
|
1485
1773
|
}
|
|
1486
1774
|
|
|
1487
|
-
static jsi::Value intoRust(
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1775
|
+
static jsi::Value intoRust(
|
|
1776
|
+
jsi::Runtime &rt,
|
|
1777
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1778
|
+
const jsi::Value &thisValue,
|
|
1779
|
+
const jsi::Value *args,
|
|
1780
|
+
size_t count,
|
|
1781
|
+
UniffiForeignFutureCompletePointer func) {
|
|
1492
1782
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1493
1783
|
// then call the rs_callback with those arguments.
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
rt, callInvoker, args[1]));
|
|
1784
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker, args[1])
|
|
1785
|
+
);
|
|
1497
1786
|
|
|
1498
|
-
|
|
1787
|
+
|
|
1788
|
+
return jsi::Value::undefined();
|
|
1499
1789
|
}
|
|
1500
1790
|
};
|
|
1501
1791
|
} // namespace uniffi::rusaint
|
|
@@ -1504,13 +1794,13 @@ using namespace facebook;
|
|
|
1504
1794
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1505
1795
|
|
|
1506
1796
|
template <> struct Bridging<UniffiForeignFutureStructRustBuffer> {
|
|
1507
|
-
static UniffiForeignFutureStructRustBuffer
|
|
1508
|
-
|
|
1509
|
-
|
|
1797
|
+
static UniffiForeignFutureStructRustBuffer fromJs(jsi::Runtime &rt,
|
|
1798
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1799
|
+
const jsi::Value &jsValue
|
|
1800
|
+
) {
|
|
1510
1801
|
// Check if the input is an object
|
|
1511
1802
|
if (!jsValue.isObject()) {
|
|
1512
|
-
throw jsi::JSError(
|
|
1513
|
-
rt, "Expected an object for UniffiForeignFutureStructRustBuffer");
|
|
1803
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructRustBuffer");
|
|
1514
1804
|
}
|
|
1515
1805
|
|
|
1516
1806
|
// Get the object from the jsi::Value
|
|
@@ -1521,48 +1811,55 @@ template <> struct Bridging<UniffiForeignFutureStructRustBuffer> {
|
|
|
1521
1811
|
|
|
1522
1812
|
// Create the vtable from the js callbacks.
|
|
1523
1813
|
rsObject.return_value = uniffi::rusaint::Bridging<RustBuffer>::fromJs(
|
|
1524
|
-
rt, callInvoker,
|
|
1814
|
+
rt, callInvoker,
|
|
1815
|
+
jsObject.getProperty(rt, "returnValue")
|
|
1816
|
+
);
|
|
1525
1817
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1526
|
-
rt, callInvoker,
|
|
1818
|
+
rt, callInvoker,
|
|
1819
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1820
|
+
);
|
|
1527
1821
|
|
|
1528
1822
|
return rsObject;
|
|
1529
1823
|
}
|
|
1530
1824
|
};
|
|
1531
1825
|
|
|
1532
1826
|
} // namespace uniffi::rusaint
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
// callbacks.
|
|
1827
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteRustBuffer,
|
|
1828
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1536
1829
|
namespace uniffi::rusaint {
|
|
1537
1830
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1538
1831
|
|
|
1539
1832
|
template <> struct Bridging<UniffiForeignFutureCompleteRustBuffer> {
|
|
1540
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1541
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1542
|
-
UniffiForeignFutureCompleteRustBuffer rsCallback) {
|
|
1833
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteRustBuffer rsCallback) {
|
|
1543
1834
|
return jsi::Function::createFromHostFunction(
|
|
1544
|
-
rt,
|
|
1835
|
+
rt,
|
|
1836
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteRustBuffer"),
|
|
1545
1837
|
2,
|
|
1546
|
-
[rsCallback, callInvoker](
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1838
|
+
[rsCallback, callInvoker](
|
|
1839
|
+
jsi::Runtime &rt,
|
|
1840
|
+
const jsi::Value &thisValue,
|
|
1841
|
+
const jsi::Value *arguments,
|
|
1842
|
+
size_t count) -> jsi::Value
|
|
1843
|
+
{
|
|
1844
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1845
|
+
}
|
|
1846
|
+
);
|
|
1552
1847
|
}
|
|
1553
1848
|
|
|
1554
|
-
static jsi::Value intoRust(
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1849
|
+
static jsi::Value intoRust(
|
|
1850
|
+
jsi::Runtime &rt,
|
|
1851
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1852
|
+
const jsi::Value &thisValue,
|
|
1853
|
+
const jsi::Value *args,
|
|
1854
|
+
size_t count,
|
|
1855
|
+
UniffiForeignFutureCompleteRustBuffer func) {
|
|
1559
1856
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1560
1857
|
// then call the rs_callback with those arguments.
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
rt, callInvoker, args[1]));
|
|
1858
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, args[1])
|
|
1859
|
+
);
|
|
1564
1860
|
|
|
1565
|
-
|
|
1861
|
+
|
|
1862
|
+
return jsi::Value::undefined();
|
|
1566
1863
|
}
|
|
1567
1864
|
};
|
|
1568
1865
|
} // namespace uniffi::rusaint
|
|
@@ -1571,13 +1868,13 @@ using namespace facebook;
|
|
|
1571
1868
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1572
1869
|
|
|
1573
1870
|
template <> struct Bridging<UniffiForeignFutureStructVoid> {
|
|
1574
|
-
static UniffiForeignFutureStructVoid
|
|
1575
|
-
|
|
1576
|
-
|
|
1871
|
+
static UniffiForeignFutureStructVoid fromJs(jsi::Runtime &rt,
|
|
1872
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1873
|
+
const jsi::Value &jsValue
|
|
1874
|
+
) {
|
|
1577
1875
|
// Check if the input is an object
|
|
1578
1876
|
if (!jsValue.isObject()) {
|
|
1579
|
-
throw jsi::JSError(
|
|
1580
|
-
rt, "Expected an object for UniffiForeignFutureStructVoid");
|
|
1877
|
+
throw jsi::JSError(rt, "Expected an object for UniffiForeignFutureStructVoid");
|
|
1581
1878
|
}
|
|
1582
1879
|
|
|
1583
1880
|
// Get the object from the jsi::Value
|
|
@@ -1588,60 +1885,72 @@ template <> struct Bridging<UniffiForeignFutureStructVoid> {
|
|
|
1588
1885
|
|
|
1589
1886
|
// Create the vtable from the js callbacks.
|
|
1590
1887
|
rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
|
|
1591
|
-
rt, callInvoker,
|
|
1888
|
+
rt, callInvoker,
|
|
1889
|
+
jsObject.getProperty(rt, "callStatus")
|
|
1890
|
+
);
|
|
1592
1891
|
|
|
1593
1892
|
return rsObject;
|
|
1594
1893
|
}
|
|
1595
1894
|
};
|
|
1596
1895
|
|
|
1597
1896
|
} // namespace uniffi::rusaint
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
// callbacks.
|
|
1897
|
+
// Implementation of callback function calling from JS to Rust ForeignFutureCompleteVoid,
|
|
1898
|
+
// passed from Rust to JS as part of async callbacks.
|
|
1601
1899
|
namespace uniffi::rusaint {
|
|
1602
1900
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1603
1901
|
|
|
1604
1902
|
template <> struct Bridging<UniffiForeignFutureCompleteVoid> {
|
|
1605
|
-
static jsi::Value toJs(jsi::Runtime &rt,
|
|
1606
|
-
std::shared_ptr<CallInvoker> callInvoker,
|
|
1607
|
-
UniffiForeignFutureCompleteVoid rsCallback) {
|
|
1903
|
+
static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker, UniffiForeignFutureCompleteVoid rsCallback) {
|
|
1608
1904
|
return jsi::Function::createFromHostFunction(
|
|
1609
|
-
rt,
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1905
|
+
rt,
|
|
1906
|
+
jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteVoid"),
|
|
1907
|
+
2,
|
|
1908
|
+
[rsCallback, callInvoker](
|
|
1909
|
+
jsi::Runtime &rt,
|
|
1910
|
+
const jsi::Value &thisValue,
|
|
1911
|
+
const jsi::Value *arguments,
|
|
1912
|
+
size_t count) -> jsi::Value
|
|
1913
|
+
{
|
|
1914
|
+
return intoRust(rt, callInvoker, thisValue, arguments, count, rsCallback);
|
|
1915
|
+
}
|
|
1916
|
+
);
|
|
1616
1917
|
}
|
|
1617
1918
|
|
|
1618
|
-
static jsi::Value intoRust(
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1919
|
+
static jsi::Value intoRust(
|
|
1920
|
+
jsi::Runtime &rt,
|
|
1921
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1922
|
+
const jsi::Value &thisValue,
|
|
1923
|
+
const jsi::Value *args,
|
|
1924
|
+
size_t count,
|
|
1925
|
+
UniffiForeignFutureCompleteVoid func) {
|
|
1623
1926
|
// Convert the arguments into the Rust, with Bridging<T>::fromJs,
|
|
1624
1927
|
// then call the rs_callback with those arguments.
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
rt, callInvoker, args[1]));
|
|
1928
|
+
func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<UniffiForeignFutureStructVoid>::fromJs(rt, callInvoker, args[1])
|
|
1929
|
+
);
|
|
1628
1930
|
|
|
1629
|
-
|
|
1931
|
+
|
|
1932
|
+
return jsi::Value::undefined();
|
|
1630
1933
|
}
|
|
1631
1934
|
};
|
|
1632
1935
|
} // namespace uniffi::rusaint
|
|
1633
1936
|
|
|
1937
|
+
|
|
1634
1938
|
namespace uniffi::rusaint {
|
|
1635
1939
|
using namespace facebook;
|
|
1636
1940
|
using CallInvoker = uniffi_runtime::UniffiCallInvoker;
|
|
1637
1941
|
|
|
1638
1942
|
template <> struct Bridging<UniffiRustFutureContinuationCallback> {
|
|
1639
|
-
static UniffiRustFutureContinuationCallback
|
|
1640
|
-
|
|
1641
|
-
|
|
1943
|
+
static UniffiRustFutureContinuationCallback fromJs(
|
|
1944
|
+
jsi::Runtime &rt,
|
|
1945
|
+
std::shared_ptr<CallInvoker> callInvoker,
|
|
1946
|
+
const jsi::Value &value
|
|
1947
|
+
) {
|
|
1642
1948
|
try {
|
|
1643
|
-
return uniffi::rusaint::cb::rustfuturecontinuationcallback::
|
|
1644
|
-
|
|
1949
|
+
return uniffi::rusaint::cb::rustfuturecontinuationcallback::makeCallbackFunction(
|
|
1950
|
+
rt,
|
|
1951
|
+
callInvoker,
|
|
1952
|
+
value
|
|
1953
|
+
);
|
|
1645
1954
|
} catch (const std::logic_error &e) {
|
|
1646
1955
|
throw jsi::JSError(rt, e.what());
|
|
1647
1956
|
}
|
|
@@ -1652,834 +1961,582 @@ template <> struct Bridging<UniffiRustFutureContinuationCallback> {
|
|
|
1652
1961
|
|
|
1653
1962
|
NativeRusaint::NativeRusaint(
|
|
1654
1963
|
jsi::Runtime &rt,
|
|
1655
|
-
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> invoker
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
return this
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
return this
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
->
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
->
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
->
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_"
|
|
1923
|
-
"lecture"] = jsi::Function::createFromHostFunction(
|
|
1924
|
-
rt,
|
|
1925
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
|
|
1926
|
-
"lecturecategorybuilder_find_by_lecture"),
|
|
1927
|
-
0,
|
|
1928
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
1929
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1930
|
-
return this
|
|
1931
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture(
|
|
1932
|
-
rt, thisVal, args, count);
|
|
1933
|
-
});
|
|
1934
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_"
|
|
1935
|
-
"professor"] = jsi::Function::createFromHostFunction(
|
|
1936
|
-
rt,
|
|
1937
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
|
|
1938
|
-
"lecturecategorybuilder_find_by_professor"),
|
|
1939
|
-
0,
|
|
1940
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
1941
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1942
|
-
return this
|
|
1943
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor(
|
|
1944
|
-
rt, thisVal, args, count);
|
|
1945
|
-
});
|
|
1946
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_"
|
|
1947
|
-
"graduated"] = jsi::Function::createFromHostFunction(
|
|
1948
|
-
rt,
|
|
1949
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
|
|
1950
|
-
"lecturecategorybuilder_graduated"),
|
|
1951
|
-
0,
|
|
1952
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
1953
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1954
|
-
return this
|
|
1955
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated(
|
|
1956
|
-
rt, thisVal, args, count);
|
|
1957
|
-
});
|
|
1958
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_major"] =
|
|
1959
|
-
jsi::Function::createFromHostFunction(
|
|
1960
|
-
rt,
|
|
1961
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
|
|
1962
|
-
"lecturecategorybuilder_major"),
|
|
1963
|
-
0,
|
|
1964
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
1965
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1966
|
-
return this
|
|
1967
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_major(
|
|
1968
|
-
rt, thisVal, args, count);
|
|
1969
|
-
});
|
|
1970
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_"
|
|
1971
|
-
"elective"] = jsi::Function::createFromHostFunction(
|
|
1972
|
-
rt,
|
|
1973
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
|
|
1974
|
-
"lecturecategorybuilder_optional_elective"),
|
|
1975
|
-
0,
|
|
1976
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
1977
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1978
|
-
return this
|
|
1979
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective(
|
|
1980
|
-
rt, thisVal, args, count);
|
|
1981
|
-
});
|
|
1982
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_"
|
|
1983
|
-
"other_major"] = jsi::Function::createFromHostFunction(
|
|
1984
|
-
rt,
|
|
1985
|
-
jsi::PropNameID::forAscii(
|
|
1986
|
-
rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_"
|
|
1987
|
-
"recognized_other_major"),
|
|
1988
|
-
0,
|
|
1989
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
1990
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1991
|
-
return this
|
|
1992
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major(
|
|
1993
|
-
rt, thisVal, args, count);
|
|
1994
|
-
});
|
|
1995
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_required_"
|
|
1996
|
-
"elective"] = jsi::Function::createFromHostFunction(
|
|
1997
|
-
rt,
|
|
1998
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
|
|
1999
|
-
"lecturecategorybuilder_required_elective"),
|
|
2000
|
-
0,
|
|
2001
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
2002
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2003
|
-
return this
|
|
2004
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective(
|
|
2005
|
-
rt, thisVal, args, count);
|
|
2006
|
-
});
|
|
2007
|
-
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_united_"
|
|
2008
|
-
"major"] = jsi::Function::createFromHostFunction(
|
|
2009
|
-
rt,
|
|
2010
|
-
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
|
|
2011
|
-
"lecturecategorybuilder_united_major"),
|
|
2012
|
-
0,
|
|
2013
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
2014
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2015
|
-
return this
|
|
2016
|
-
->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major(
|
|
2017
|
-
rt, thisVal, args, count);
|
|
2018
|
-
});
|
|
2019
|
-
props["ubrn_uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new"] =
|
|
2020
|
-
jsi::Function::createFromHostFunction(
|
|
2021
|
-
rt,
|
|
2022
|
-
jsi::PropNameID::forAscii(rt,
|
|
2023
|
-
"ubrn_uniffi_rusaint_checksum_constructor_"
|
|
2024
|
-
"lecturecategorybuilder_new"),
|
|
2025
|
-
0,
|
|
2026
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
2027
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2028
|
-
return this
|
|
2029
|
-
->cpp_uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new(
|
|
2030
|
-
rt, thisVal, args, count);
|
|
2031
|
-
});
|
|
2032
|
-
props["ubrn_ffi_rusaint_uniffi_contract_version"] =
|
|
2033
|
-
jsi::Function::createFromHostFunction(
|
|
2034
|
-
rt,
|
|
2035
|
-
jsi::PropNameID::forAscii(rt,
|
|
2036
|
-
"ubrn_ffi_rusaint_uniffi_contract_version"),
|
|
2037
|
-
0,
|
|
2038
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
2039
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2040
|
-
return this->cpp_ffi_rusaint_uniffi_contract_version(rt, thisVal,
|
|
2041
|
-
args, count);
|
|
2042
|
-
});
|
|
2043
|
-
props["ubrn_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_"
|
|
2044
|
-
"pointer"] = jsi::Function::createFromHostFunction(
|
|
2045
|
-
rt,
|
|
2046
|
-
jsi::PropNameID::forAscii(rt,
|
|
2047
|
-
"ubrn_uniffi_internal_fn_method_"
|
|
2048
|
-
"lecturecategorybuilder_ffi__bless_pointer"),
|
|
2049
|
-
1,
|
|
2050
|
-
[this](jsi::Runtime &rt, const jsi::Value &thisVal,
|
|
2051
|
-
const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2052
|
-
return this
|
|
2053
|
-
->cpp_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer(
|
|
2054
|
-
rt, thisVal, args, count);
|
|
2055
|
-
});
|
|
1964
|
+
std::shared_ptr<uniffi_runtime::UniffiCallInvoker> invoker
|
|
1965
|
+
) : callInvoker(invoker), props() {
|
|
1966
|
+
// Map from Javascript names to the cpp names
|
|
1967
|
+
props["ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"] = jsi::Function::createFromHostFunction(
|
|
1968
|
+
rt,
|
|
1969
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"),
|
|
1970
|
+
1,
|
|
1971
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1972
|
+
return this->cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(rt, thisVal, args, count);
|
|
1973
|
+
}
|
|
1974
|
+
);
|
|
1975
|
+
props["ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"] = jsi::Function::createFromHostFunction(
|
|
1976
|
+
rt,
|
|
1977
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"),
|
|
1978
|
+
1,
|
|
1979
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1980
|
+
return this->cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(rt, thisVal, args, count);
|
|
1981
|
+
}
|
|
1982
|
+
);
|
|
1983
|
+
props["ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"] = jsi::Function::createFromHostFunction(
|
|
1984
|
+
rt,
|
|
1985
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"),
|
|
1986
|
+
1,
|
|
1987
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1988
|
+
return this->cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(rt, thisVal, args, count);
|
|
1989
|
+
}
|
|
1990
|
+
);
|
|
1991
|
+
props["ubrn_uniffi_rusaint_fn_clone_lecturecategorybuilder"] = jsi::Function::createFromHostFunction(
|
|
1992
|
+
rt,
|
|
1993
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_clone_lecturecategorybuilder"),
|
|
1994
|
+
1,
|
|
1995
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
1996
|
+
return this->cpp_uniffi_rusaint_fn_clone_lecturecategorybuilder(rt, thisVal, args, count);
|
|
1997
|
+
}
|
|
1998
|
+
);
|
|
1999
|
+
props["ubrn_uniffi_rusaint_fn_free_lecturecategorybuilder"] = jsi::Function::createFromHostFunction(
|
|
2000
|
+
rt,
|
|
2001
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_free_lecturecategorybuilder"),
|
|
2002
|
+
1,
|
|
2003
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2004
|
+
return this->cpp_uniffi_rusaint_fn_free_lecturecategorybuilder(rt, thisVal, args, count);
|
|
2005
|
+
}
|
|
2006
|
+
);
|
|
2007
|
+
props["ubrn_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new"] = jsi::Function::createFromHostFunction(
|
|
2008
|
+
rt,
|
|
2009
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new"),
|
|
2010
|
+
0,
|
|
2011
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2012
|
+
return this->cpp_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(rt, thisVal, args, count);
|
|
2013
|
+
}
|
|
2014
|
+
);
|
|
2015
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel"] = jsi::Function::createFromHostFunction(
|
|
2016
|
+
rt,
|
|
2017
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel"),
|
|
2018
|
+
2,
|
|
2019
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2020
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(rt, thisVal, args, count);
|
|
2021
|
+
}
|
|
2022
|
+
);
|
|
2023
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major"] = jsi::Function::createFromHostFunction(
|
|
2024
|
+
rt,
|
|
2025
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major"),
|
|
2026
|
+
2,
|
|
2027
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2028
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(rt, thisVal, args, count);
|
|
2029
|
+
}
|
|
2030
|
+
);
|
|
2031
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber"] = jsi::Function::createFromHostFunction(
|
|
2032
|
+
rt,
|
|
2033
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber"),
|
|
2034
|
+
1,
|
|
2035
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2036
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(rt, thisVal, args, count);
|
|
2037
|
+
}
|
|
2038
|
+
);
|
|
2039
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_education"] = jsi::Function::createFromHostFunction(
|
|
2040
|
+
rt,
|
|
2041
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_education"),
|
|
2042
|
+
1,
|
|
2043
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2044
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_education(rt, thisVal, args, count);
|
|
2045
|
+
}
|
|
2046
|
+
);
|
|
2047
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture"] = jsi::Function::createFromHostFunction(
|
|
2048
|
+
rt,
|
|
2049
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture"),
|
|
2050
|
+
2,
|
|
2051
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2052
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(rt, thisVal, args, count);
|
|
2053
|
+
}
|
|
2054
|
+
);
|
|
2055
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor"] = jsi::Function::createFromHostFunction(
|
|
2056
|
+
rt,
|
|
2057
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor"),
|
|
2058
|
+
2,
|
|
2059
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2060
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(rt, thisVal, args, count);
|
|
2061
|
+
}
|
|
2062
|
+
);
|
|
2063
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated"] = jsi::Function::createFromHostFunction(
|
|
2064
|
+
rt,
|
|
2065
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated"),
|
|
2066
|
+
3,
|
|
2067
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2068
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(rt, thisVal, args, count);
|
|
2069
|
+
}
|
|
2070
|
+
);
|
|
2071
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_major"] = jsi::Function::createFromHostFunction(
|
|
2072
|
+
rt,
|
|
2073
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_major"),
|
|
2074
|
+
4,
|
|
2075
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2076
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_major(rt, thisVal, args, count);
|
|
2077
|
+
}
|
|
2078
|
+
);
|
|
2079
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective"] = jsi::Function::createFromHostFunction(
|
|
2080
|
+
rt,
|
|
2081
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective"),
|
|
2082
|
+
2,
|
|
2083
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2084
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(rt, thisVal, args, count);
|
|
2085
|
+
}
|
|
2086
|
+
);
|
|
2087
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major"] = jsi::Function::createFromHostFunction(
|
|
2088
|
+
rt,
|
|
2089
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major"),
|
|
2090
|
+
4,
|
|
2091
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2092
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(rt, thisVal, args, count);
|
|
2093
|
+
}
|
|
2094
|
+
);
|
|
2095
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective"] = jsi::Function::createFromHostFunction(
|
|
2096
|
+
rt,
|
|
2097
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective"),
|
|
2098
|
+
2,
|
|
2099
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2100
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(rt, thisVal, args, count);
|
|
2101
|
+
}
|
|
2102
|
+
);
|
|
2103
|
+
props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_united_major"] = jsi::Function::createFromHostFunction(
|
|
2104
|
+
rt,
|
|
2105
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_united_major"),
|
|
2106
|
+
2,
|
|
2107
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2108
|
+
return this->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(rt, thisVal, args, count);
|
|
2109
|
+
}
|
|
2110
|
+
);
|
|
2111
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel"] = jsi::Function::createFromHostFunction(
|
|
2112
|
+
rt,
|
|
2113
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel"),
|
|
2114
|
+
0,
|
|
2115
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2116
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel(rt, thisVal, args, count);
|
|
2117
|
+
}
|
|
2118
|
+
);
|
|
2119
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major"] = jsi::Function::createFromHostFunction(
|
|
2120
|
+
rt,
|
|
2121
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major"),
|
|
2122
|
+
0,
|
|
2123
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2124
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major(rt, thisVal, args, count);
|
|
2125
|
+
}
|
|
2126
|
+
);
|
|
2127
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber"] = jsi::Function::createFromHostFunction(
|
|
2128
|
+
rt,
|
|
2129
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber"),
|
|
2130
|
+
0,
|
|
2131
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2132
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber(rt, thisVal, args, count);
|
|
2133
|
+
}
|
|
2134
|
+
);
|
|
2135
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_education"] = jsi::Function::createFromHostFunction(
|
|
2136
|
+
rt,
|
|
2137
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_education"),
|
|
2138
|
+
0,
|
|
2139
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2140
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_education(rt, thisVal, args, count);
|
|
2141
|
+
}
|
|
2142
|
+
);
|
|
2143
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture"] = jsi::Function::createFromHostFunction(
|
|
2144
|
+
rt,
|
|
2145
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture"),
|
|
2146
|
+
0,
|
|
2147
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2148
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture(rt, thisVal, args, count);
|
|
2149
|
+
}
|
|
2150
|
+
);
|
|
2151
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor"] = jsi::Function::createFromHostFunction(
|
|
2152
|
+
rt,
|
|
2153
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor"),
|
|
2154
|
+
0,
|
|
2155
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2156
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor(rt, thisVal, args, count);
|
|
2157
|
+
}
|
|
2158
|
+
);
|
|
2159
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated"] = jsi::Function::createFromHostFunction(
|
|
2160
|
+
rt,
|
|
2161
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated"),
|
|
2162
|
+
0,
|
|
2163
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2164
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated(rt, thisVal, args, count);
|
|
2165
|
+
}
|
|
2166
|
+
);
|
|
2167
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_major"] = jsi::Function::createFromHostFunction(
|
|
2168
|
+
rt,
|
|
2169
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_major"),
|
|
2170
|
+
0,
|
|
2171
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2172
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_major(rt, thisVal, args, count);
|
|
2173
|
+
}
|
|
2174
|
+
);
|
|
2175
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective"] = jsi::Function::createFromHostFunction(
|
|
2176
|
+
rt,
|
|
2177
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective"),
|
|
2178
|
+
0,
|
|
2179
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2180
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective(rt, thisVal, args, count);
|
|
2181
|
+
}
|
|
2182
|
+
);
|
|
2183
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major"] = jsi::Function::createFromHostFunction(
|
|
2184
|
+
rt,
|
|
2185
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major"),
|
|
2186
|
+
0,
|
|
2187
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2188
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major(rt, thisVal, args, count);
|
|
2189
|
+
}
|
|
2190
|
+
);
|
|
2191
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective"] = jsi::Function::createFromHostFunction(
|
|
2192
|
+
rt,
|
|
2193
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective"),
|
|
2194
|
+
0,
|
|
2195
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2196
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective(rt, thisVal, args, count);
|
|
2197
|
+
}
|
|
2198
|
+
);
|
|
2199
|
+
props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major"] = jsi::Function::createFromHostFunction(
|
|
2200
|
+
rt,
|
|
2201
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major"),
|
|
2202
|
+
0,
|
|
2203
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2204
|
+
return this->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major(rt, thisVal, args, count);
|
|
2205
|
+
}
|
|
2206
|
+
);
|
|
2207
|
+
props["ubrn_uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new"] = jsi::Function::createFromHostFunction(
|
|
2208
|
+
rt,
|
|
2209
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new"),
|
|
2210
|
+
0,
|
|
2211
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2212
|
+
return this->cpp_uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new(rt, thisVal, args, count);
|
|
2213
|
+
}
|
|
2214
|
+
);
|
|
2215
|
+
props["ubrn_ffi_rusaint_uniffi_contract_version"] = jsi::Function::createFromHostFunction(
|
|
2216
|
+
rt,
|
|
2217
|
+
jsi::PropNameID::forAscii(rt, "ubrn_ffi_rusaint_uniffi_contract_version"),
|
|
2218
|
+
0,
|
|
2219
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2220
|
+
return this->cpp_ffi_rusaint_uniffi_contract_version(rt, thisVal, args, count);
|
|
2221
|
+
}
|
|
2222
|
+
);
|
|
2223
|
+
props["ubrn_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer"] = jsi::Function::createFromHostFunction(
|
|
2224
|
+
rt,
|
|
2225
|
+
jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer"),
|
|
2226
|
+
1,
|
|
2227
|
+
[this](jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) -> jsi::Value {
|
|
2228
|
+
return this->cpp_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer(rt, thisVal, args, count);
|
|
2229
|
+
}
|
|
2230
|
+
);
|
|
2056
2231
|
}
|
|
2057
2232
|
|
|
2058
|
-
void NativeRusaint::registerModule(
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
auto obj = rt.global().createFromHostObject(rt, tm);
|
|
2064
|
-
rt.global().setProperty(rt, "NativeRusaint", obj);
|
|
2233
|
+
void NativeRusaint::registerModule(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> callInvoker) {
|
|
2234
|
+
auto invoker = std::make_shared<uniffi_runtime::UniffiCallInvoker>(callInvoker);
|
|
2235
|
+
auto tm = std::make_shared<NativeRusaint>(rt, invoker);
|
|
2236
|
+
auto obj = rt.global().createFromHostObject(rt, tm);
|
|
2237
|
+
rt.global().setProperty(rt, "NativeRusaint", obj);
|
|
2065
2238
|
}
|
|
2066
2239
|
|
|
2067
2240
|
void NativeRusaint::unregisterModule(jsi::Runtime &rt) {
|
|
2068
|
-
|
|
2241
|
+
uniffi::rusaint::registry::clearRegistry();
|
|
2069
2242
|
}
|
|
2070
2243
|
|
|
2071
|
-
jsi::Value NativeRusaint::get(jsi::Runtime
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2244
|
+
jsi::Value NativeRusaint::get(jsi::Runtime& rt, const jsi::PropNameID& name) {
|
|
2245
|
+
try {
|
|
2246
|
+
return jsi::Value(rt, props.at(name.utf8(rt)));
|
|
2247
|
+
}
|
|
2248
|
+
catch (std::out_of_range &e) {
|
|
2249
|
+
return jsi::Value::undefined();
|
|
2250
|
+
}
|
|
2077
2251
|
}
|
|
2078
2252
|
|
|
2079
|
-
std::vector<jsi::PropNameID> NativeRusaint::getPropertyNames(jsi::Runtime
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2253
|
+
std::vector<jsi::PropNameID> NativeRusaint::getPropertyNames(jsi::Runtime& rt) {
|
|
2254
|
+
std::vector<jsi::PropNameID> rval;
|
|
2255
|
+
for (auto& [key, value] : props) {
|
|
2256
|
+
rval.push_back(jsi::PropNameID::forUtf8(rt, key));
|
|
2257
|
+
}
|
|
2258
|
+
return rval;
|
|
2085
2259
|
}
|
|
2086
2260
|
|
|
2087
|
-
void NativeRusaint::set(jsi::Runtime
|
|
2088
|
-
|
|
2089
|
-
props.insert_or_assign(name.utf8(rt), &value);
|
|
2261
|
+
void NativeRusaint::set(jsi::Runtime& rt, const jsi::PropNameID& name, const jsi::Value& value) {
|
|
2262
|
+
props.insert_or_assign(name.utf8(rt), &value);
|
|
2090
2263
|
}
|
|
2091
2264
|
|
|
2092
2265
|
NativeRusaint::~NativeRusaint() {
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2266
|
+
// Cleanup for callback function RustFutureContinuationCallback
|
|
2267
|
+
uniffi::rusaint::cb::rustfuturecontinuationcallback::cleanup();
|
|
2268
|
+
// Cleanup for "free" callback function CallbackInterfaceFree
|
|
2269
|
+
uniffi::rusaint::st::foreignfuture::foreignfuture::free::cleanup();
|
|
2097
2270
|
}
|
|
2098
2271
|
|
|
2099
2272
|
// Utility functions for serialization/deserialization of strings.
|
|
2100
|
-
jsi::Value
|
|
2101
|
-
|
|
2102
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
2103
|
-
size_t count) {
|
|
2104
|
-
return uniffi_jsi::Bridging<std::string>::string_to_bytelength(rt, args[0]);
|
|
2273
|
+
jsi::Value NativeRusaint::cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2274
|
+
return uniffi_jsi::Bridging<std::string>::string_to_bytelength(rt, args[0]);
|
|
2105
2275
|
}
|
|
2106
2276
|
|
|
2107
|
-
jsi::Value
|
|
2108
|
-
|
|
2109
|
-
jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
|
|
2110
|
-
size_t count) {
|
|
2111
|
-
return uniffi_jsi::Bridging<std::string>::string_to_arraybuffer(rt, args[0]);
|
|
2277
|
+
jsi::Value NativeRusaint::cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2278
|
+
return uniffi_jsi::Bridging<std::string>::string_to_arraybuffer(rt, args[0]);
|
|
2112
2279
|
}
|
|
2113
2280
|
|
|
2114
|
-
jsi::Value
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
auto static destructor = [](uint64_t p) {
|
|
2127
|
-
auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
|
|
2128
|
-
RustCallStatus status = {0};
|
|
2129
|
-
uniffi_rusaint_fn_free_lecturecategorybuilder(pointer, &status);
|
|
2130
|
-
};
|
|
2131
|
-
auto ptrObj =
|
|
2132
|
-
std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
|
|
2133
|
-
auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
|
|
2134
|
-
return jsi::Value(rt, obj);
|
|
2281
|
+
jsi::Value NativeRusaint::cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2282
|
+
return uniffi_jsi::Bridging<std::string>::arraybuffer_to_string(rt, args[0]);
|
|
2283
|
+
}jsi::Value NativeRusaint::cpp_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2284
|
+
auto pointer = uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
|
|
2285
|
+
auto static destructor = [](uint64_t p) {
|
|
2286
|
+
auto pointer = reinterpret_cast<void *>(static_cast<uintptr_t>(p));
|
|
2287
|
+
RustCallStatus status = {0};
|
|
2288
|
+
uniffi_rusaint_fn_free_lecturecategorybuilder(pointer, &status);
|
|
2289
|
+
};
|
|
2290
|
+
auto ptrObj = std::make_shared<uniffi_jsi::DestructibleObject>(pointer, destructor);
|
|
2291
|
+
auto obj = jsi::Object::createFromHostObject(rt, ptrObj);
|
|
2292
|
+
return jsi::Value(rt, obj);
|
|
2135
2293
|
}
|
|
2136
2294
|
|
|
2137
2295
|
// Methods calling directly into the uniffi generated C API of the Rust crate.
|
|
2138
|
-
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_clone_lecturecategorybuilder(
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2296
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_clone_lecturecategorybuilder(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2297
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2298
|
+
auto value = uniffi_rusaint_fn_clone_lecturecategorybuilder(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2299
|
+
&status
|
|
2300
|
+
);
|
|
2301
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2302
|
+
|
|
2303
|
+
|
|
2304
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2149
2305
|
}
|
|
2150
|
-
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_free_lecturecategorybuilder(
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
return jsi::Value::undefined();
|
|
2306
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_free_lecturecategorybuilder(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2307
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2308
|
+
uniffi_rusaint_fn_free_lecturecategorybuilder(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2309
|
+
&status
|
|
2310
|
+
);
|
|
2311
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
return jsi::Value::undefined();
|
|
2161
2315
|
}
|
|
2162
|
-
jsi::Value
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2171
|
-
args[count - 1]);
|
|
2172
|
-
|
|
2173
|
-
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2316
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2317
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2318
|
+
auto value = uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(&status
|
|
2319
|
+
);
|
|
2320
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2321
|
+
|
|
2322
|
+
|
|
2323
|
+
return uniffi_jsi::Bridging<void *>::toJs(rt, callInvoker, value);
|
|
2174
2324
|
}
|
|
2175
|
-
jsi::Value
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
&status);
|
|
2185
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2186
|
-
args[count - 1]);
|
|
2187
|
-
|
|
2188
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2325
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2326
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2327
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2328
|
+
&status
|
|
2329
|
+
);
|
|
2330
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2189
2334
|
}
|
|
2190
|
-
jsi::Value NativeRusaint::
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
&status);
|
|
2200
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2201
|
-
args[count - 1]);
|
|
2202
|
-
|
|
2203
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2335
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2336
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2337
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2338
|
+
&status
|
|
2339
|
+
);
|
|
2340
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2341
|
+
|
|
2342
|
+
|
|
2343
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2204
2344
|
}
|
|
2205
|
-
jsi::Value
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
args[count - 1]);
|
|
2215
|
-
|
|
2216
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2345
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2346
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2347
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2348
|
+
&status
|
|
2349
|
+
);
|
|
2350
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2217
2354
|
}
|
|
2218
|
-
jsi::Value
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
args[count - 1]);
|
|
2228
|
-
|
|
2229
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2355
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_education(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2356
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2357
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_education(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
|
|
2358
|
+
&status
|
|
2359
|
+
);
|
|
2360
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2230
2364
|
}
|
|
2231
|
-
jsi::Value NativeRusaint::
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
&status);
|
|
2241
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2242
|
-
args[count - 1]);
|
|
2243
|
-
|
|
2244
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2365
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2366
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2367
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2368
|
+
&status
|
|
2369
|
+
);
|
|
2370
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2371
|
+
|
|
2372
|
+
|
|
2373
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2245
2374
|
}
|
|
2246
|
-
jsi::Value NativeRusaint::
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
2256
|
-
args[1]),
|
|
2257
|
-
&status);
|
|
2258
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2259
|
-
args[count - 1]);
|
|
2260
|
-
|
|
2261
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2375
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2376
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2377
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2378
|
+
&status
|
|
2379
|
+
);
|
|
2380
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2262
2384
|
}
|
|
2263
|
-
jsi::Value
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
2273
|
-
&status);
|
|
2274
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2275
|
-
args[count - 1]);
|
|
2276
|
-
|
|
2277
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2385
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2386
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2387
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
2388
|
+
&status
|
|
2389
|
+
);
|
|
2390
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2278
2394
|
}
|
|
2279
|
-
jsi::Value
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]),
|
|
2289
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]),
|
|
2290
|
-
&status);
|
|
2291
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2292
|
-
args[count - 1]);
|
|
2293
|
-
|
|
2294
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2395
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2396
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2397
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_major(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]),
|
|
2398
|
+
&status
|
|
2399
|
+
);
|
|
2400
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2295
2404
|
}
|
|
2296
|
-
jsi::Value NativeRusaint::
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
2306
|
-
args[1]),
|
|
2307
|
-
&status);
|
|
2308
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2309
|
-
args[count - 1]);
|
|
2310
|
-
|
|
2311
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2405
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2406
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2407
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2408
|
+
&status
|
|
2409
|
+
);
|
|
2410
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2312
2414
|
}
|
|
2313
|
-
jsi::Value NativeRusaint::
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
2323
|
-
args[1]),
|
|
2324
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
2325
|
-
args[2]),
|
|
2326
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
2327
|
-
args[3]),
|
|
2328
|
-
&status);
|
|
2329
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2330
|
-
args[count - 1]);
|
|
2331
|
-
|
|
2332
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2415
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2416
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2417
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[2]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[3]),
|
|
2418
|
+
&status
|
|
2419
|
+
);
|
|
2420
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2333
2424
|
}
|
|
2334
|
-
jsi::Value NativeRusaint::
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker,
|
|
2344
|
-
args[1]),
|
|
2345
|
-
&status);
|
|
2346
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2347
|
-
args[count - 1]);
|
|
2348
|
-
|
|
2349
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2425
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2426
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2427
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2428
|
+
&status
|
|
2429
|
+
);
|
|
2430
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2431
|
+
|
|
2432
|
+
|
|
2433
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2350
2434
|
}
|
|
2351
|
-
jsi::Value
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
&status);
|
|
2361
|
-
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
|
|
2362
|
-
args[count - 1]);
|
|
2363
|
-
|
|
2364
|
-
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2435
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2436
|
+
RustCallStatus status = uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
|
|
2437
|
+
auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
|
|
2438
|
+
&status
|
|
2439
|
+
);
|
|
2440
|
+
uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status, args[count - 1]);
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
return uniffi::rusaint::Bridging<RustBuffer>::toJs(rt, callInvoker, value);
|
|
2365
2444
|
}
|
|
2366
|
-
jsi::Value
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
size_t count) {
|
|
2370
|
-
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel();
|
|
2445
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2446
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel(
|
|
2447
|
+
);
|
|
2371
2448
|
|
|
2372
|
-
|
|
2449
|
+
|
|
2450
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2373
2451
|
}
|
|
2374
|
-
jsi::Value NativeRusaint::
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2452
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2453
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major(
|
|
2454
|
+
);
|
|
2455
|
+
|
|
2456
|
+
|
|
2457
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2382
2458
|
}
|
|
2383
|
-
jsi::Value
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
size_t count) {
|
|
2387
|
-
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber();
|
|
2459
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2460
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber(
|
|
2461
|
+
);
|
|
2388
2462
|
|
|
2389
|
-
|
|
2463
|
+
|
|
2464
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2390
2465
|
}
|
|
2391
|
-
jsi::Value NativeRusaint::
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2466
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_education(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2467
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_education(
|
|
2468
|
+
);
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2399
2472
|
}
|
|
2400
|
-
jsi::Value NativeRusaint::
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2473
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2474
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture(
|
|
2475
|
+
);
|
|
2476
|
+
|
|
2477
|
+
|
|
2478
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2408
2479
|
}
|
|
2409
|
-
jsi::Value NativeRusaint::
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2480
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2481
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor(
|
|
2482
|
+
);
|
|
2483
|
+
|
|
2484
|
+
|
|
2485
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2417
2486
|
}
|
|
2418
|
-
jsi::Value NativeRusaint::
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2487
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2488
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated(
|
|
2489
|
+
);
|
|
2490
|
+
|
|
2491
|
+
|
|
2492
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2426
2493
|
}
|
|
2427
|
-
jsi::Value
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
size_t count) {
|
|
2431
|
-
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_major();
|
|
2494
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2495
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_major(
|
|
2496
|
+
);
|
|
2432
2497
|
|
|
2433
|
-
|
|
2498
|
+
|
|
2499
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2434
2500
|
}
|
|
2435
|
-
jsi::Value NativeRusaint::
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2501
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2502
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective(
|
|
2503
|
+
);
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2443
2507
|
}
|
|
2444
|
-
jsi::Value NativeRusaint::
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2508
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2509
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major(
|
|
2510
|
+
);
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2452
2514
|
}
|
|
2453
|
-
jsi::Value NativeRusaint::
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2515
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2516
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective(
|
|
2517
|
+
);
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2461
2521
|
}
|
|
2462
|
-
jsi::Value NativeRusaint::
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2522
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2523
|
+
auto value = uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major(
|
|
2524
|
+
);
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2470
2528
|
}
|
|
2471
|
-
jsi::Value NativeRusaint::
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
size_t count) {
|
|
2475
|
-
auto value = uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new();
|
|
2529
|
+
jsi::Value NativeRusaint::cpp_uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2530
|
+
auto value = uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new(
|
|
2531
|
+
);
|
|
2476
2532
|
|
|
2477
|
-
|
|
2533
|
+
|
|
2534
|
+
return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
|
|
2478
2535
|
}
|
|
2479
|
-
jsi::Value NativeRusaint::cpp_ffi_rusaint_uniffi_contract_version(
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
auto value = ffi_rusaint_uniffi_contract_version();
|
|
2536
|
+
jsi::Value NativeRusaint::cpp_ffi_rusaint_uniffi_contract_version(jsi::Runtime& rt, const jsi::Value& thisVal, const jsi::Value* args, size_t count) {
|
|
2537
|
+
auto value = ffi_rusaint_uniffi_contract_version(
|
|
2538
|
+
);
|
|
2483
2539
|
|
|
2484
|
-
|
|
2540
|
+
|
|
2541
|
+
return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
|
|
2485
2542
|
}
|