@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.
Files changed (31) hide show
  1. package/android/src/main/jniLibs/arm64-v8a/librusaint_ffi.a +0 -0
  2. package/android/src/main/jniLibs/armeabi-v7a/librusaint_ffi.a +0 -0
  3. package/android/src/main/jniLibs/x86/librusaint_ffi.a +0 -0
  4. package/android/src/main/jniLibs/x86_64/librusaint_ffi.a +0 -0
  5. package/build/RusaintReactNativeFramework.xcframework/Info.plist +4 -4
  6. package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeDirectory +0 -0
  7. package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeRequirements +0 -0
  8. package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
  9. package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeResources +128 -0
  10. package/build/RusaintReactNativeFramework.xcframework/_CodeSignature/CodeSignature +0 -0
  11. package/build/RusaintReactNativeFramework.xcframework/ios-arm64/librusaint_ffi.a +0 -0
  12. package/build/RusaintReactNativeFramework.xcframework/ios-arm64-simulator/librusaint_ffi.a +0 -0
  13. package/cpp/generated/rusaint.cpp +1762 -1705
  14. package/cpp/generated/rusaint.hpp +64 -153
  15. package/cpp/generated/rusaint_ffi.cpp +5235 -6669
  16. package/cpp/generated/rusaint_ffi.hpp +255 -858
  17. package/lib/typescript/commonjs/package.json +1 -0
  18. package/lib/typescript/module/package.json +1 -0
  19. package/lib/typescript/module/src/NativeReactNative.d.ts +8 -0
  20. package/lib/typescript/module/src/NativeReactNative.d.ts.map +1 -0
  21. package/lib/typescript/module/src/generated/rusaint-ffi.d.ts +109 -0
  22. package/lib/typescript/module/src/generated/rusaint-ffi.d.ts.map +1 -0
  23. package/lib/typescript/module/src/generated/rusaint.d.ts +2330 -0
  24. package/lib/typescript/module/src/generated/rusaint.d.ts.map +1 -0
  25. package/lib/typescript/module/src/generated/rusaint_ffi-ffi.d.ts +300 -0
  26. package/lib/typescript/module/src/generated/rusaint_ffi-ffi.d.ts.map +1 -0
  27. package/lib/typescript/module/src/generated/rusaint_ffi.d.ts +1111 -0
  28. package/lib/typescript/module/src/generated/rusaint_ffi.d.ts.map +1 -0
  29. package/lib/typescript/module/src/index.d.ts +10 -0
  30. package/lib/typescript/module/src/index.d.ts.map +1 -0
  31. package/package.json +2 -2
@@ -1,287 +1,454 @@
1
- // This file was autogenerated by some hot garbage in the
2
- // `uniffi-bindgen-react-native` crate. Trust me, you don't want to mess with
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 <thread>
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 (*UniffiRustFutureContinuationCallback)(uint64_t data,
19
- int8_t poll_result);
20
- typedef void (*UniffiForeignFutureFree)(uint64_t handle);
21
- typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle);
22
- typedef struct UniffiForeignFuture {
23
- uint64_t handle;
24
- UniffiForeignFutureFree free;
25
- } UniffiForeignFuture;
26
- typedef struct UniffiForeignFutureStructU8 {
27
- uint8_t return_value;
28
- RustCallStatus call_status;
29
- } UniffiForeignFutureStructU8;
30
- typedef void (*UniffiForeignFutureCompleteU8)(
31
- uint64_t callback_data, UniffiForeignFutureStructU8 result);
32
- typedef struct UniffiForeignFutureStructI8 {
33
- int8_t return_value;
34
- RustCallStatus call_status;
35
- } UniffiForeignFutureStructI8;
36
- typedef void (*UniffiForeignFutureCompleteI8)(
37
- uint64_t callback_data, UniffiForeignFutureStructI8 result);
38
- typedef struct UniffiForeignFutureStructU16 {
39
- uint16_t return_value;
40
- RustCallStatus call_status;
41
- } UniffiForeignFutureStructU16;
42
- typedef void (*UniffiForeignFutureCompleteU16)(
43
- uint64_t callback_data, UniffiForeignFutureStructU16 result);
44
- typedef struct UniffiForeignFutureStructI16 {
45
- int16_t return_value;
46
- RustCallStatus call_status;
47
- } UniffiForeignFutureStructI16;
48
- typedef void (*UniffiForeignFutureCompleteI16)(
49
- uint64_t callback_data, UniffiForeignFutureStructI16 result);
50
- typedef struct UniffiForeignFutureStructU32 {
51
- uint32_t return_value;
52
- RustCallStatus call_status;
53
- } UniffiForeignFutureStructU32;
54
- typedef void (*UniffiForeignFutureCompleteU32)(
55
- uint64_t callback_data, UniffiForeignFutureStructU32 result);
56
- typedef struct UniffiForeignFutureStructI32 {
57
- int32_t return_value;
58
- RustCallStatus call_status;
59
- } UniffiForeignFutureStructI32;
60
- typedef void (*UniffiForeignFutureCompleteI32)(
61
- uint64_t callback_data, UniffiForeignFutureStructI32 result);
62
- typedef struct UniffiForeignFutureStructU64 {
63
- uint64_t return_value;
64
- RustCallStatus call_status;
65
- } UniffiForeignFutureStructU64;
66
- typedef void (*UniffiForeignFutureCompleteU64)(
67
- uint64_t callback_data, UniffiForeignFutureStructU64 result);
68
- typedef struct UniffiForeignFutureStructI64 {
69
- int64_t return_value;
70
- RustCallStatus call_status;
71
- } UniffiForeignFutureStructI64;
72
- typedef void (*UniffiForeignFutureCompleteI64)(
73
- uint64_t callback_data, UniffiForeignFutureStructI64 result);
74
- typedef struct UniffiForeignFutureStructF32 {
75
- float return_value;
76
- RustCallStatus call_status;
77
- } UniffiForeignFutureStructF32;
78
- typedef void (*UniffiForeignFutureCompleteF32)(
79
- uint64_t callback_data, UniffiForeignFutureStructF32 result);
80
- typedef struct UniffiForeignFutureStructF64 {
81
- double return_value;
82
- RustCallStatus call_status;
83
- } UniffiForeignFutureStructF64;
84
- typedef void (*UniffiForeignFutureCompleteF64)(
85
- uint64_t callback_data, UniffiForeignFutureStructF64 result);
86
- typedef struct UniffiForeignFutureStructPointer {
87
- void *return_value;
88
- RustCallStatus call_status;
89
- } UniffiForeignFutureStructPointer;
90
- typedef void (*UniffiForeignFutureCompletePointer)(
91
- uint64_t callback_data, UniffiForeignFutureStructPointer result);
92
- typedef struct UniffiForeignFutureStructRustBuffer {
93
- RustBuffer return_value;
94
- RustCallStatus call_status;
95
- } UniffiForeignFutureStructRustBuffer;
96
- typedef void (*UniffiForeignFutureCompleteRustBuffer)(
97
- uint64_t callback_data, UniffiForeignFutureStructRustBuffer result);
98
- typedef struct UniffiForeignFutureStructVoid {
99
- RustCallStatus call_status;
100
- } UniffiForeignFutureStructVoid;
101
- typedef void (*UniffiForeignFutureCompleteVoid)(
102
- uint64_t callback_data, UniffiForeignFutureStructVoid result);
103
- void *
104
- uniffi_rusaint_fn_clone_lecturecategorybuilder(void *ptr,
105
- RustCallStatus *uniffi_out_err);
106
- void uniffi_rusaint_fn_free_lecturecategorybuilder(
107
- void *ptr, RustCallStatus *uniffi_out_err);
108
- void *uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(
109
- RustCallStatus *uniffi_out_err);
110
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(
111
- void *ptr, RustBuffer lecture_name, RustCallStatus *uniffi_out_err);
112
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(
113
- void *ptr, RustBuffer major, RustCallStatus *uniffi_out_err);
114
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(
115
- void *ptr, RustCallStatus *uniffi_out_err);
116
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_education(
117
- void *ptr, RustCallStatus *uniffi_out_err);
118
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(
119
- void *ptr, RustBuffer keyword, RustCallStatus *uniffi_out_err);
120
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(
121
- void *ptr, RustBuffer keyword, RustCallStatus *uniffi_out_err);
122
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(
123
- void *ptr, RustBuffer collage, RustBuffer department,
124
- RustCallStatus *uniffi_out_err);
125
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_major(
126
- void *ptr, RustBuffer collage, RustBuffer department, RustBuffer major,
127
- RustCallStatus *uniffi_out_err);
128
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(
129
- void *ptr, RustBuffer category, RustCallStatus *uniffi_out_err);
130
- RustBuffer
131
- uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(
132
- void *ptr, RustBuffer collage, RustBuffer department, RustBuffer major,
133
- RustCallStatus *uniffi_out_err);
134
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(
135
- void *ptr, RustBuffer lecture_name, RustCallStatus *uniffi_out_err);
136
- RustBuffer uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(
137
- void *ptr, RustBuffer major, RustCallStatus *uniffi_out_err);
138
- RustBuffer ffi_rusaint_rustbuffer_alloc(uint64_t size,
139
- RustCallStatus *uniffi_out_err);
140
- RustBuffer ffi_rusaint_rustbuffer_from_bytes(ForeignBytes bytes,
141
- RustCallStatus *uniffi_out_err);
142
- void ffi_rusaint_rustbuffer_free(RustBuffer buf,
143
- RustCallStatus *uniffi_out_err);
144
- RustBuffer ffi_rusaint_rustbuffer_reserve(RustBuffer buf, uint64_t additional,
145
- RustCallStatus *uniffi_out_err);
146
- void ffi_rusaint_rust_future_poll_u8(
147
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
148
- /*handle*/ uint64_t callback_data);
149
- void ffi_rusaint_rust_future_cancel_u8(
150
- /*handle*/ uint64_t handle);
151
- void ffi_rusaint_rust_future_free_u8(
152
- /*handle*/ uint64_t handle);
153
- uint8_t ffi_rusaint_rust_future_complete_u8(
154
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
155
- void ffi_rusaint_rust_future_poll_i8(
156
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
157
- /*handle*/ uint64_t callback_data);
158
- void ffi_rusaint_rust_future_cancel_i8(
159
- /*handle*/ uint64_t handle);
160
- void ffi_rusaint_rust_future_free_i8(
161
- /*handle*/ uint64_t handle);
162
- int8_t ffi_rusaint_rust_future_complete_i8(
163
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
164
- void ffi_rusaint_rust_future_poll_u16(
165
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
166
- /*handle*/ uint64_t callback_data);
167
- void ffi_rusaint_rust_future_cancel_u16(
168
- /*handle*/ uint64_t handle);
169
- void ffi_rusaint_rust_future_free_u16(
170
- /*handle*/ uint64_t handle);
171
- uint16_t ffi_rusaint_rust_future_complete_u16(
172
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
173
- void ffi_rusaint_rust_future_poll_i16(
174
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
175
- /*handle*/ uint64_t callback_data);
176
- void ffi_rusaint_rust_future_cancel_i16(
177
- /*handle*/ uint64_t handle);
178
- void ffi_rusaint_rust_future_free_i16(
179
- /*handle*/ uint64_t handle);
180
- int16_t ffi_rusaint_rust_future_complete_i16(
181
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
182
- void ffi_rusaint_rust_future_poll_u32(
183
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
184
- /*handle*/ uint64_t callback_data);
185
- void ffi_rusaint_rust_future_cancel_u32(
186
- /*handle*/ uint64_t handle);
187
- void ffi_rusaint_rust_future_free_u32(
188
- /*handle*/ uint64_t handle);
189
- uint32_t ffi_rusaint_rust_future_complete_u32(
190
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
191
- void ffi_rusaint_rust_future_poll_i32(
192
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
193
- /*handle*/ uint64_t callback_data);
194
- void ffi_rusaint_rust_future_cancel_i32(
195
- /*handle*/ uint64_t handle);
196
- void ffi_rusaint_rust_future_free_i32(
197
- /*handle*/ uint64_t handle);
198
- int32_t ffi_rusaint_rust_future_complete_i32(
199
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
200
- void ffi_rusaint_rust_future_poll_u64(
201
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
202
- /*handle*/ uint64_t callback_data);
203
- void ffi_rusaint_rust_future_cancel_u64(
204
- /*handle*/ uint64_t handle);
205
- void ffi_rusaint_rust_future_free_u64(
206
- /*handle*/ uint64_t handle);
207
- uint64_t ffi_rusaint_rust_future_complete_u64(
208
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
209
- void ffi_rusaint_rust_future_poll_i64(
210
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
211
- /*handle*/ uint64_t callback_data);
212
- void ffi_rusaint_rust_future_cancel_i64(
213
- /*handle*/ uint64_t handle);
214
- void ffi_rusaint_rust_future_free_i64(
215
- /*handle*/ uint64_t handle);
216
- int64_t ffi_rusaint_rust_future_complete_i64(
217
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
218
- void ffi_rusaint_rust_future_poll_f32(
219
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
220
- /*handle*/ uint64_t callback_data);
221
- void ffi_rusaint_rust_future_cancel_f32(
222
- /*handle*/ uint64_t handle);
223
- void ffi_rusaint_rust_future_free_f32(
224
- /*handle*/ uint64_t handle);
225
- float ffi_rusaint_rust_future_complete_f32(
226
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
227
- void ffi_rusaint_rust_future_poll_f64(
228
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
229
- /*handle*/ uint64_t callback_data);
230
- void ffi_rusaint_rust_future_cancel_f64(
231
- /*handle*/ uint64_t handle);
232
- void ffi_rusaint_rust_future_free_f64(
233
- /*handle*/ uint64_t handle);
234
- double ffi_rusaint_rust_future_complete_f64(
235
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
236
- void ffi_rusaint_rust_future_poll_pointer(
237
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
238
- /*handle*/ uint64_t callback_data);
239
- void ffi_rusaint_rust_future_cancel_pointer(
240
- /*handle*/ uint64_t handle);
241
- void ffi_rusaint_rust_future_free_pointer(
242
- /*handle*/ uint64_t handle);
243
- void *ffi_rusaint_rust_future_complete_pointer(
244
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
245
- void ffi_rusaint_rust_future_poll_rust_buffer(
246
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
247
- /*handle*/ uint64_t callback_data);
248
- void ffi_rusaint_rust_future_cancel_rust_buffer(
249
- /*handle*/ uint64_t handle);
250
- void ffi_rusaint_rust_future_free_rust_buffer(
251
- /*handle*/ uint64_t handle);
252
- RustBuffer ffi_rusaint_rust_future_complete_rust_buffer(
253
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
254
- void ffi_rusaint_rust_future_poll_void(
255
- /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback,
256
- /*handle*/ uint64_t callback_data);
257
- void ffi_rusaint_rust_future_cancel_void(
258
- /*handle*/ uint64_t handle);
259
- void ffi_rusaint_rust_future_free_void(
260
- /*handle*/ uint64_t handle);
261
- void ffi_rusaint_rust_future_complete_void(
262
- /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err);
263
- uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel();
264
- uint16_t
265
- uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major();
266
- uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber();
267
- uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_education();
268
- uint16_t
269
- uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture();
270
- uint16_t
271
- uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor();
272
- uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated();
273
- uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_major();
274
- uint16_t
275
- uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective();
276
- uint16_t
277
- uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major();
278
- uint16_t
279
- uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective();
280
- uint16_t uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major();
281
- uint16_t uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new();
282
- uint32_t ffi_rusaint_uniffi_contract_version();
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(rt,
304
- "Expected ReferenceHolder to have a pointee property. "
305
- "This is likely a bug in uniffi-bindgen-react-native");
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
- RustCallStatus status = {UNIFFI_CALL_STATUS_OK};
316
- return ffi_rusaint_rustbuffer_alloc(size, &status);
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(buf, &status);
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(bytes, &status);
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, status.error_buf);
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 = Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
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 = Bridging<RustBuffer>::fromJs(rt, invoker, rbuf);
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> class VTableHolder {
445
- public:
446
- T vtable;
447
- VTableHolder(T v) : vtable(v) {}
448
- };
449
-
450
- // Mutex to bind the storage and setting of vtable together.
451
- // We declare it here, but the lock is taken by callers of the putTable
452
- // method who are also sending a pointer to Rust.
453
- static std::mutex vtableMutex;
454
-
455
- // Registry to hold all vtables so they persist even when JS objects are GC'd.
456
- // The only reason this exists is to prevent a dangling pointer in the
457
- // Rust machinery: i.e. we don't need to access or write to this registry
458
- // after startup.
459
- // Registry to hold all vtables so they persist even when JS objects are GC'd.
460
- // Maps string identifiers to vtable holders using type erasure
461
- static std::unordered_map<std::string, std::shared_ptr<void>> vtableRegistry;
462
-
463
- // Add a vtable to the registry with an identifier
464
- template <typename T>
465
- static T *putTable(std::string_view identifier, T vtable) {
466
- auto holder = std::make_shared<VTableHolder<T>>(vtable);
467
- // Store the raw pointer to the vtable before type erasure
468
- T *rawPtr = &(holder->vtable);
469
- // Store the holder using type erasure with the string identifier
470
- vtableRegistry[std::string(identifier)] = std::shared_ptr<void>(holder);
471
- return rawPtr;
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
- std::lock_guard<std::mutex> lock(vtableMutex);
485
- vtableRegistry.clear();
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
- // function calls the lambda, which itself calls the `body` which then calls
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
- // lambda sometime in the future.
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
- std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
518
- std::shared_ptr<jsi::Value> callbackValue, uint64_t rs_data,
519
- int8_t rs_pollResult) {
520
-
521
- // Convert the arguments from Rust, into jsi::Values.
522
- // We'll use the Bridging class to do this…
523
- auto js_data = uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_data);
524
- auto js_pollResult =
525
- uniffi_jsi::Bridging<int8_t>::toJs(rt, callInvoker, rs_pollResult);
526
-
527
- // Now we are ready to call the callback.
528
- // We are already on the JS thread, because this `body` function was
529
- // invoked from the CallInvoker.
530
- try {
531
- // Getting the callback function
532
- auto cb = callbackValue->asObject(rt).asFunction(rt);
533
- auto uniffiResult = cb.call(rt, js_data, js_pollResult);
534
-
535
- } catch (const jsi::JSError &error) {
536
- std::cout << "Error in callback UniffiRustFutureContinuationCallback: "
537
- << error.what() << std::endl;
538
- throw error;
539
- }
540
- }
541
-
542
- static void callback(uint64_t rs_data, int8_t rs_pollResult) {
543
- // If the runtime has shutdown, then there is no point in trying to
544
- // call into Javascript. BUT how do we tell if the runtime has shutdown?
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
- // The runtime, the actual callback jsi::funtion, and the callInvoker
557
- // are all in the lambda.
558
- rsLambda(rs_data, rs_pollResult);
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
- jsi::Runtime &rt,
564
- std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
565
- const jsi::Value &value) {
566
- if (rsLambda != nullptr) {
567
- // `makeCallbackFunction` is called in two circumstances:
568
- //
569
- // 1. at startup, when initializing callback interface vtables.
570
- // 2. when polling futures. This happens at least once per future that is
571
- // exposed to Javascript. We know that this is always the same function,
572
- // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
573
- //
574
- // We can therefore return the callback function without making anything
575
- // new if we've been initialized already.
576
- return callback;
577
- }
578
- auto callbackFunction = value.asObject(rt).asFunction(rt);
579
- auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
580
- rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_data,
581
- int8_t rs_pollResult) {
582
- // We immediately make a lambda which will do the work of transforming the
583
- // arguments into JSI values and calling the callback.
584
- uniffi_runtime::UniffiCallFunc jsLambda =
585
- [callInvoker, callbackValue, rs_data,
586
- rs_pollResult](jsi::Runtime &rt) mutable {
587
- body(rt, callInvoker, callbackValue, rs_data, rs_pollResult);
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
- // We'll then call that lambda from the callInvoker which will
590
- // look after calling it on the correct thread.
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
- // happens when the jsi::Runtime is being destroyed.
599
- static void cleanup() {
600
- // The lambda holds a reference to the the Runtime, so when this is nulled
601
- // out, then the pointer will no longer be left dangling.
602
- rsLambda = nullptr;
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
- // Implementation of callback function calling from JS to Rust
606
- // ForeignFutureFree, passed from Rust to JS as part of async callbacks.
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1,
616
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
617
- const jsi::Value *arguments,
618
- size_t count) -> jsi::Value {
619
- return intoRust(rt, callInvoker, thisValue, arguments, count,
620
- rsCallback);
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(jsi::Runtime &rt,
625
- std::shared_ptr<CallInvoker> callInvoker,
626
- const jsi::Value &thisValue,
627
- const jsi::Value *args, size_t count,
628
- UniffiForeignFutureFree func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]));
819
+ func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0])
820
+ );
632
821
 
633
- return jsi::Value::undefined();
822
+
823
+ return jsi::Value::undefined();
634
824
  }
635
825
  };
636
826
  } // namespace uniffi::rusaint
637
- // Implementation of free callback function CallbackInterfaceFree
827
+ // Implementation of free callback function CallbackInterfaceFree
638
828
 
639
- // Callback function:
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
- // function calls the lambda, which itself calls the `body` which then calls
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
- // lambda sometime in the future.
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
- std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
664
- std::shared_ptr<jsi::Value> callbackValue,
665
- uint64_t rs_handle) {
666
-
667
- // Convert the arguments from Rust, into jsi::Values.
668
- // We'll use the Bridging class to do this…
669
- auto js_handle =
670
- uniffi_jsi::Bridging<uint64_t>::toJs(rt, callInvoker, rs_handle);
671
-
672
- // Now we are ready to call the callback.
673
- // We are already on the JS thread, because this `body` function was
674
- // invoked from the CallInvoker.
675
- try {
676
- // Getting the callback function
677
- auto cb = callbackValue->asObject(rt).asFunction(rt);
678
- auto uniffiResult = cb.call(rt, js_handle);
679
-
680
- } catch (const jsi::JSError &error) {
681
- std::cout << "Error in callback UniffiCallbackInterfaceFree: "
682
- << error.what() << std::endl;
683
- throw error;
684
- }
685
- }
686
-
687
- static void callback(uint64_t rs_handle) {
688
- // If the runtime has shutdown, then there is no point in trying to
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
- // The runtime, the actual callback jsi::funtion, and the callInvoker
702
- // are all in the lambda.
703
- rsLambda(rs_handle);
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
- jsi::Runtime &rt,
709
- std::shared_ptr<uniffi_runtime::UniffiCallInvoker> callInvoker,
710
- const jsi::Value &value) {
711
- if (rsLambda != nullptr) {
712
- // `makeCallbackFunction` is called in two circumstances:
713
- //
714
- // 1. at startup, when initializing callback interface vtables.
715
- // 2. when polling futures. This happens at least once per future that is
716
- // exposed to Javascript. We know that this is always the same function,
717
- // `uniffiFutureContinuationCallback` in `async-rust-calls.ts`.
718
- //
719
- // We can therefore return the callback function without making anything
720
- // new if we've been initialized already.
721
- return callback;
722
- }
723
- auto callbackFunction = value.asObject(rt).asFunction(rt);
724
- auto callbackValue = std::make_shared<jsi::Value>(rt, callbackFunction);
725
- rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle) {
726
- // We immediately make a lambda which will do the work of transforming the
727
- // arguments into JSI values and calling the callback.
728
- uniffi_runtime::UniffiCallFunc jsLambda =
729
- [callInvoker, callbackValue, rs_handle](jsi::Runtime &rt) mutable {
730
- body(rt, callInvoker, callbackValue, rs_handle);
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
- // We'll then call that lambda from the callInvoker which will
733
- // look after calling it on the correct thread.
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
- // happens when the jsi::Runtime is being destroyed.
742
- static void cleanup() {
743
- // The lambda holds a reference to the the Runtime, so when this is nulled
744
- // out, then the pointer will no longer be left dangling.
745
- rsLambda = nullptr;
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
- std::shared_ptr<CallInvoker> callInvoker,
755
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "handle"));
770
- rsObject.free = uniffi::rusaint::st::foreignfuture::foreignfuture::free::
771
- makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "free"));
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
785
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1000
+ rt, callInvoker,
1001
+ jsObject.getProperty(rt, "returnValue")
1002
+ );
801
1003
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
802
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
810
- // ForeignFutureCompleteU8, passed from Rust to JS as part of async callbacks.
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU8"), 2,
820
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
821
- const jsi::Value *arguments,
822
- size_t count) -> jsi::Value {
823
- return intoRust(rt, callInvoker, thisValue, arguments, count,
824
- rsCallback);
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(jsi::Runtime &rt,
829
- std::shared_ptr<CallInvoker> callInvoker,
830
- const jsi::Value &thisValue,
831
- const jsi::Value *args, size_t count,
832
- UniffiForeignFutureCompleteU8 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
836
- uniffi::rusaint::Bridging<UniffiForeignFutureStructU8>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
850
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1074
+ rt, callInvoker,
1075
+ jsObject.getProperty(rt, "returnValue")
1076
+ );
866
1077
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
867
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
875
- // ForeignFutureCompleteI8, passed from Rust to JS as part of async callbacks.
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI8"), 2,
885
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
886
- const jsi::Value *arguments,
887
- size_t count) -> jsi::Value {
888
- return intoRust(rt, callInvoker, thisValue, arguments, count,
889
- rsCallback);
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(jsi::Runtime &rt,
894
- std::shared_ptr<CallInvoker> callInvoker,
895
- const jsi::Value &thisValue,
896
- const jsi::Value *args, size_t count,
897
- UniffiForeignFutureCompleteI8 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
901
- uniffi::rusaint::Bridging<UniffiForeignFutureStructI8>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
915
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1148
+ rt, callInvoker,
1149
+ jsObject.getProperty(rt, "returnValue")
1150
+ );
931
1151
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
932
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
940
- // ForeignFutureCompleteU16, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU16"), 2,
951
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
952
- const jsi::Value *arguments,
953
- size_t count) -> jsi::Value {
954
- return intoRust(rt, callInvoker, thisValue, arguments, count,
955
- rsCallback);
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(jsi::Runtime &rt,
960
- std::shared_ptr<CallInvoker> callInvoker,
961
- const jsi::Value &thisValue,
962
- const jsi::Value *args, size_t count,
963
- UniffiForeignFutureCompleteU16 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
967
- uniffi::rusaint::Bridging<UniffiForeignFutureStructU16>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
981
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1222
+ rt, callInvoker,
1223
+ jsObject.getProperty(rt, "returnValue")
1224
+ );
997
1225
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
998
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1006
- // ForeignFutureCompleteI16, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI16"), 2,
1017
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1018
- const jsi::Value *arguments,
1019
- size_t count) -> jsi::Value {
1020
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1021
- rsCallback);
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(jsi::Runtime &rt,
1026
- std::shared_ptr<CallInvoker> callInvoker,
1027
- const jsi::Value &thisValue,
1028
- const jsi::Value *args, size_t count,
1029
- UniffiForeignFutureCompleteI16 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1033
- uniffi::rusaint::Bridging<UniffiForeignFutureStructI16>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1047
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1296
+ rt, callInvoker,
1297
+ jsObject.getProperty(rt, "returnValue")
1298
+ );
1063
1299
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1064
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1072
- // ForeignFutureCompleteU32, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU32"), 2,
1083
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1084
- const jsi::Value *arguments,
1085
- size_t count) -> jsi::Value {
1086
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1087
- rsCallback);
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(jsi::Runtime &rt,
1092
- std::shared_ptr<CallInvoker> callInvoker,
1093
- const jsi::Value &thisValue,
1094
- const jsi::Value *args, size_t count,
1095
- UniffiForeignFutureCompleteU32 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1099
- uniffi::rusaint::Bridging<UniffiForeignFutureStructU32>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1113
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1370
+ rt, callInvoker,
1371
+ jsObject.getProperty(rt, "returnValue")
1372
+ );
1129
1373
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1130
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1138
- // ForeignFutureCompleteI32, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI32"), 2,
1149
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1150
- const jsi::Value *arguments,
1151
- size_t count) -> jsi::Value {
1152
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1153
- rsCallback);
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(jsi::Runtime &rt,
1158
- std::shared_ptr<CallInvoker> callInvoker,
1159
- const jsi::Value &thisValue,
1160
- const jsi::Value *args, size_t count,
1161
- UniffiForeignFutureCompleteI32 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1165
- uniffi::rusaint::Bridging<UniffiForeignFutureStructI32>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1179
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1444
+ rt, callInvoker,
1445
+ jsObject.getProperty(rt, "returnValue")
1446
+ );
1195
1447
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1196
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1204
- // ForeignFutureCompleteU64, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteU64"), 2,
1215
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1216
- const jsi::Value *arguments,
1217
- size_t count) -> jsi::Value {
1218
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1219
- rsCallback);
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(jsi::Runtime &rt,
1224
- std::shared_ptr<CallInvoker> callInvoker,
1225
- const jsi::Value &thisValue,
1226
- const jsi::Value *args, size_t count,
1227
- UniffiForeignFutureCompleteU64 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1231
- uniffi::rusaint::Bridging<UniffiForeignFutureStructU64>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1245
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1518
+ rt, callInvoker,
1519
+ jsObject.getProperty(rt, "returnValue")
1520
+ );
1261
1521
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1262
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1270
- // ForeignFutureCompleteI64, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteI64"), 2,
1281
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1282
- const jsi::Value *arguments,
1283
- size_t count) -> jsi::Value {
1284
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1285
- rsCallback);
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(jsi::Runtime &rt,
1290
- std::shared_ptr<CallInvoker> callInvoker,
1291
- const jsi::Value &thisValue,
1292
- const jsi::Value *args, size_t count,
1293
- UniffiForeignFutureCompleteI64 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1297
- uniffi::rusaint::Bridging<UniffiForeignFutureStructI64>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1311
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1592
+ rt, callInvoker,
1593
+ jsObject.getProperty(rt, "returnValue")
1594
+ );
1327
1595
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1328
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1336
- // ForeignFutureCompleteF32, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF32"), 2,
1347
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1348
- const jsi::Value *arguments,
1349
- size_t count) -> jsi::Value {
1350
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1351
- rsCallback);
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(jsi::Runtime &rt,
1356
- std::shared_ptr<CallInvoker> callInvoker,
1357
- const jsi::Value &thisValue,
1358
- const jsi::Value *args, size_t count,
1359
- UniffiForeignFutureCompleteF32 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1363
- uniffi::rusaint::Bridging<UniffiForeignFutureStructF32>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1377
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1666
+ rt, callInvoker,
1667
+ jsObject.getProperty(rt, "returnValue")
1668
+ );
1393
1669
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1394
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1402
- // ForeignFutureCompleteF64, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteF64"), 2,
1413
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1414
- const jsi::Value *arguments,
1415
- size_t count) -> jsi::Value {
1416
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1417
- rsCallback);
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(jsi::Runtime &rt,
1422
- std::shared_ptr<CallInvoker> callInvoker,
1423
- const jsi::Value &thisValue,
1424
- const jsi::Value *args, size_t count,
1425
- UniffiForeignFutureCompleteF64 func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1429
- uniffi::rusaint::Bridging<UniffiForeignFutureStructF64>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1443
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1740
+ rt, callInvoker,
1741
+ jsObject.getProperty(rt, "returnValue")
1742
+ );
1459
1743
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1460
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1468
- // ForeignFutureCompletePointer, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2,
1479
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1480
- const jsi::Value *arguments,
1481
- size_t count) -> jsi::Value {
1482
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1483
- rsCallback);
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(jsi::Runtime &rt,
1488
- std::shared_ptr<CallInvoker> callInvoker,
1489
- const jsi::Value &thisValue,
1490
- const jsi::Value *args, size_t count,
1491
- UniffiForeignFutureCompletePointer func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1495
- uniffi::rusaint::Bridging<UniffiForeignFutureStructPointer>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1509
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "returnValue"));
1814
+ rt, callInvoker,
1815
+ jsObject.getProperty(rt, "returnValue")
1816
+ );
1525
1817
  rsObject.call_status = uniffi::rusaint::Bridging<RustCallStatus>::fromJs(
1526
- rt, callInvoker, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1534
- // ForeignFutureCompleteRustBuffer, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteRustBuffer"),
1835
+ rt,
1836
+ jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteRustBuffer"),
1545
1837
  2,
1546
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1547
- const jsi::Value *arguments,
1548
- size_t count) -> jsi::Value {
1549
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1550
- rsCallback);
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(jsi::Runtime &rt,
1555
- std::shared_ptr<CallInvoker> callInvoker,
1556
- const jsi::Value &thisValue,
1557
- const jsi::Value *args, size_t count,
1558
- UniffiForeignFutureCompleteRustBuffer func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1562
- uniffi::rusaint::Bridging<UniffiForeignFutureStructRustBuffer>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1576
- const jsi::Value &jsValue) {
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, jsObject.getProperty(rt, "callStatus"));
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
- // Implementation of callback function calling from JS to Rust
1599
- // ForeignFutureCompleteVoid, passed from Rust to JS as part of async
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, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteVoid"), 2,
1610
- [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue,
1611
- const jsi::Value *arguments,
1612
- size_t count) -> jsi::Value {
1613
- return intoRust(rt, callInvoker, thisValue, arguments, count,
1614
- rsCallback);
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(jsi::Runtime &rt,
1619
- std::shared_ptr<CallInvoker> callInvoker,
1620
- const jsi::Value &thisValue,
1621
- const jsi::Value *args, size_t count,
1622
- UniffiForeignFutureCompleteVoid func) {
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
- func(uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]),
1626
- uniffi::rusaint::Bridging<UniffiForeignFutureStructVoid>::fromJs(
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
- return jsi::Value::undefined();
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
- fromJs(jsi::Runtime &rt, std::shared_ptr<CallInvoker> callInvoker,
1641
- const jsi::Value &value) {
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
- makeCallbackFunction(rt, callInvoker, value);
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
- : callInvoker(invoker), props() {
1657
- // Map from Javascript names to the cpp names
1658
- props["ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"] =
1659
- jsi::Function::createFromHostFunction(
1660
- rt,
1661
- jsi::PropNameID::forAscii(
1662
- rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_byte_length"),
1663
- 1,
1664
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1665
- const jsi::Value *args, size_t count) -> jsi::Value {
1666
- return this->cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(
1667
- rt, thisVal, args, count);
1668
- });
1669
- props["ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"] =
1670
- jsi::Function::createFromHostFunction(
1671
- rt,
1672
- jsi::PropNameID::forAscii(
1673
- rt, "ubrn_uniffi_internal_fn_func_ffi__string_to_arraybuffer"),
1674
- 1,
1675
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1676
- const jsi::Value *args, size_t count) -> jsi::Value {
1677
- return this->cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(
1678
- rt, thisVal, args, count);
1679
- });
1680
- props["ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"] =
1681
- jsi::Function::createFromHostFunction(
1682
- rt,
1683
- jsi::PropNameID::forAscii(
1684
- rt, "ubrn_uniffi_internal_fn_func_ffi__arraybuffer_to_string"),
1685
- 1,
1686
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1687
- const jsi::Value *args, size_t count) -> jsi::Value {
1688
- return this->cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
1689
- rt, thisVal, args, count);
1690
- });
1691
- props["ubrn_uniffi_rusaint_fn_clone_lecturecategorybuilder"] =
1692
- jsi::Function::createFromHostFunction(
1693
- rt,
1694
- jsi::PropNameID::forAscii(
1695
- rt, "ubrn_uniffi_rusaint_fn_clone_lecturecategorybuilder"),
1696
- 1,
1697
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1698
- const jsi::Value *args, size_t count) -> jsi::Value {
1699
- return this->cpp_uniffi_rusaint_fn_clone_lecturecategorybuilder(
1700
- rt, thisVal, args, count);
1701
- });
1702
- props["ubrn_uniffi_rusaint_fn_free_lecturecategorybuilder"] =
1703
- jsi::Function::createFromHostFunction(
1704
- rt,
1705
- jsi::PropNameID::forAscii(
1706
- rt, "ubrn_uniffi_rusaint_fn_free_lecturecategorybuilder"),
1707
- 1,
1708
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1709
- const jsi::Value *args, size_t count) -> jsi::Value {
1710
- return this->cpp_uniffi_rusaint_fn_free_lecturecategorybuilder(
1711
- rt, thisVal, args, count);
1712
- });
1713
- props["ubrn_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new"] =
1714
- jsi::Function::createFromHostFunction(
1715
- rt,
1716
- jsi::PropNameID::forAscii(
1717
- rt,
1718
- "ubrn_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new"),
1719
- 0,
1720
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1721
- const jsi::Value *args, size_t count) -> jsi::Value {
1722
- return this
1723
- ->cpp_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(
1724
- rt, thisVal, args, count);
1725
- });
1726
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel"] =
1727
- jsi::Function::createFromHostFunction(
1728
- rt,
1729
- jsi::PropNameID::forAscii(
1730
- rt,
1731
- "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel"),
1732
- 2,
1733
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1734
- const jsi::Value *args, size_t count) -> jsi::Value {
1735
- return this
1736
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(
1737
- rt, thisVal, args, count);
1738
- });
1739
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_connected_"
1740
- "major"] = jsi::Function::createFromHostFunction(
1741
- rt,
1742
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_"
1743
- "lecturecategorybuilder_connected_major"),
1744
- 2,
1745
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1746
- const jsi::Value *args, size_t count) -> jsi::Value {
1747
- return this
1748
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(
1749
- rt, thisVal, args, count);
1750
- });
1751
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber"] =
1752
- jsi::Function::createFromHostFunction(
1753
- rt,
1754
- jsi::PropNameID::forAscii(
1755
- rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber"),
1756
- 1,
1757
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1758
- const jsi::Value *args, size_t count) -> jsi::Value {
1759
- return this
1760
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(
1761
- rt, thisVal, args, count);
1762
- });
1763
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_education"] =
1764
- jsi::Function::createFromHostFunction(
1765
- rt,
1766
- jsi::PropNameID::forAscii(
1767
- rt,
1768
- "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_education"),
1769
- 1,
1770
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1771
- const jsi::Value *args, size_t count) -> jsi::Value {
1772
- return this
1773
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_education(
1774
- rt, thisVal, args, count);
1775
- });
1776
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_"
1777
- "lecture"] = jsi::Function::createFromHostFunction(
1778
- rt,
1779
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_"
1780
- "lecturecategorybuilder_find_by_lecture"),
1781
- 2,
1782
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1783
- const jsi::Value *args, size_t count) -> jsi::Value {
1784
- return this
1785
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(
1786
- rt, thisVal, args, count);
1787
- });
1788
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_"
1789
- "professor"] = jsi::Function::createFromHostFunction(
1790
- rt,
1791
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_"
1792
- "lecturecategorybuilder_find_by_professor"),
1793
- 2,
1794
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1795
- const jsi::Value *args, size_t count) -> jsi::Value {
1796
- return this
1797
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(
1798
- rt, thisVal, args, count);
1799
- });
1800
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated"] =
1801
- jsi::Function::createFromHostFunction(
1802
- rt,
1803
- jsi::PropNameID::forAscii(
1804
- rt,
1805
- "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated"),
1806
- 3,
1807
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1808
- const jsi::Value *args, size_t count) -> jsi::Value {
1809
- return this
1810
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(
1811
- rt, thisVal, args, count);
1812
- });
1813
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_major"] =
1814
- jsi::Function::createFromHostFunction(
1815
- rt,
1816
- jsi::PropNameID::forAscii(
1817
- rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_major"),
1818
- 4,
1819
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1820
- const jsi::Value *args, size_t count) -> jsi::Value {
1821
- return this
1822
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_major(
1823
- rt, thisVal, args, count);
1824
- });
1825
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_optional_"
1826
- "elective"] = jsi::Function::createFromHostFunction(
1827
- rt,
1828
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_"
1829
- "lecturecategorybuilder_optional_elective"),
1830
- 2,
1831
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1832
- const jsi::Value *args, size_t count) -> jsi::Value {
1833
- return this
1834
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(
1835
- rt, thisVal, args, count);
1836
- });
1837
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_"
1838
- "major"] = jsi::Function::createFromHostFunction(
1839
- rt,
1840
- jsi::PropNameID::forAscii(
1841
- rt, "ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_"
1842
- "other_major"),
1843
- 4,
1844
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1845
- const jsi::Value *args, size_t count) -> jsi::Value {
1846
- return this
1847
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(
1848
- rt, thisVal, args, count);
1849
- });
1850
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_required_"
1851
- "elective"] = jsi::Function::createFromHostFunction(
1852
- rt,
1853
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_"
1854
- "lecturecategorybuilder_required_elective"),
1855
- 2,
1856
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1857
- const jsi::Value *args, size_t count) -> jsi::Value {
1858
- return this
1859
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(
1860
- rt, thisVal, args, count);
1861
- });
1862
- props["ubrn_uniffi_rusaint_fn_method_lecturecategorybuilder_united_major"] =
1863
- jsi::Function::createFromHostFunction(
1864
- rt,
1865
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_fn_method_"
1866
- "lecturecategorybuilder_united_major"),
1867
- 2,
1868
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1869
- const jsi::Value *args, size_t count) -> jsi::Value {
1870
- return this
1871
- ->cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(
1872
- rt, thisVal, args, count);
1873
- });
1874
- props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel"] =
1875
- jsi::Function::createFromHostFunction(
1876
- rt,
1877
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
1878
- "lecturecategorybuilder_chapel"),
1879
- 0,
1880
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1881
- const jsi::Value *args, size_t count) -> jsi::Value {
1882
- return this
1883
- ->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel(
1884
- rt, thisVal, args, count);
1885
- });
1886
- props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_"
1887
- "major"] = jsi::Function::createFromHostFunction(
1888
- rt,
1889
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
1890
- "lecturecategorybuilder_connected_major"),
1891
- 0,
1892
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1893
- const jsi::Value *args, size_t count) -> jsi::Value {
1894
- return this
1895
- ->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major(
1896
- rt, thisVal, args, count);
1897
- });
1898
- props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber"] =
1899
- jsi::Function::createFromHostFunction(
1900
- rt,
1901
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
1902
- "lecturecategorybuilder_cyber"),
1903
- 0,
1904
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1905
- const jsi::Value *args, size_t count) -> jsi::Value {
1906
- return this
1907
- ->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber(
1908
- rt, thisVal, args, count);
1909
- });
1910
- props["ubrn_uniffi_rusaint_checksum_method_lecturecategorybuilder_"
1911
- "education"] = jsi::Function::createFromHostFunction(
1912
- rt,
1913
- jsi::PropNameID::forAscii(rt, "ubrn_uniffi_rusaint_checksum_method_"
1914
- "lecturecategorybuilder_education"),
1915
- 0,
1916
- [this](jsi::Runtime &rt, const jsi::Value &thisVal,
1917
- const jsi::Value *args, size_t count) -> jsi::Value {
1918
- return this
1919
- ->cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_education(
1920
- rt, thisVal, args, count);
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
- jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> callInvoker) {
2060
- auto invoker =
2061
- std::make_shared<uniffi_runtime::UniffiCallInvoker>(callInvoker);
2062
- auto tm = std::make_shared<NativeRusaint>(rt, invoker);
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
- uniffi::rusaint::registry::clearRegistry();
2241
+ uniffi::rusaint::registry::clearRegistry();
2069
2242
  }
2070
2243
 
2071
- jsi::Value NativeRusaint::get(jsi::Runtime &rt, const jsi::PropNameID &name) {
2072
- try {
2073
- return jsi::Value(rt, props.at(name.utf8(rt)));
2074
- } catch (std::out_of_range &e) {
2075
- return jsi::Value::undefined();
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 &rt) {
2080
- std::vector<jsi::PropNameID> rval;
2081
- for (auto &[key, value] : props) {
2082
- rval.push_back(jsi::PropNameID::forUtf8(rt, key));
2083
- }
2084
- return rval;
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 &rt, const jsi::PropNameID &name,
2088
- const jsi::Value &value) {
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
- // Cleanup for callback function RustFutureContinuationCallback
2094
- uniffi::rusaint::cb::rustfuturecontinuationcallback::cleanup();
2095
- // Cleanup for "free" callback function CallbackInterfaceFree
2096
- uniffi::rusaint::st::foreignfuture::foreignfuture::free::cleanup();
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
- NativeRusaint::cpp_uniffi_internal_fn_func_ffi__string_to_byte_length(
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
- NativeRusaint::cpp_uniffi_internal_fn_func_ffi__string_to_arraybuffer(
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
- NativeRusaint::cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string(
2116
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2117
- size_t count) {
2118
- return uniffi_jsi::Bridging<std::string>::arraybuffer_to_string(rt, args[0]);
2119
- }
2120
- jsi::Value NativeRusaint::
2121
- cpp_uniffi_internal_fn_method_lecturecategorybuilder_ffi__bless_pointer(
2122
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2123
- size_t count) {
2124
- auto pointer =
2125
- uniffi_jsi::Bridging<uint64_t>::fromJs(rt, callInvoker, args[0]);
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
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2140
- size_t count) {
2141
- RustCallStatus status =
2142
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2143
- auto value = uniffi_rusaint_fn_clone_lecturecategorybuilder(
2144
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
2145
- uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
2146
- args[count - 1]);
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
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2152
- size_t count) {
2153
- RustCallStatus status =
2154
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2155
- uniffi_rusaint_fn_free_lecturecategorybuilder(
2156
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
2157
- uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
2158
- args[count - 1]);
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
- NativeRusaint::cpp_uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(
2164
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2165
- size_t count) {
2166
- RustCallStatus status =
2167
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2168
- auto value =
2169
- uniffi_rusaint_fn_constructor_lecturecategorybuilder_new(&status);
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
- NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(
2177
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2178
- size_t count) {
2179
- RustCallStatus status =
2180
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2181
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_chapel(
2182
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
2183
- uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
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
- cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(
2192
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2193
- size_t count) {
2194
- RustCallStatus status =
2195
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2196
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_connected_major(
2197
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
2198
- uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
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
- NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(
2207
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2208
- size_t count) {
2209
- RustCallStatus status =
2210
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2211
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_cyber(
2212
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
2213
- uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
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
- NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_education(
2220
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2221
- size_t count) {
2222
- RustCallStatus status =
2223
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2224
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_education(
2225
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]), &status);
2226
- uniffi::rusaint::Bridging<RustCallStatus>::copyIntoJs(rt, callInvoker, status,
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
- cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(
2233
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2234
- size_t count) {
2235
- RustCallStatus status =
2236
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2237
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_lecture(
2238
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
2239
- uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
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
- cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(
2248
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2249
- size_t count) {
2250
- RustCallStatus status =
2251
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2252
- auto value =
2253
- uniffi_rusaint_fn_method_lecturecategorybuilder_find_by_professor(
2254
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
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
- NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(
2265
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2266
- size_t count) {
2267
- RustCallStatus status =
2268
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2269
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_graduated(
2270
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
2271
- uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
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
- NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_major(
2281
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2282
- size_t count) {
2283
- RustCallStatus status =
2284
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2285
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_major(
2286
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
2287
- uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
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
- cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(
2298
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2299
- size_t count) {
2300
- RustCallStatus status =
2301
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2302
- auto value =
2303
- uniffi_rusaint_fn_method_lecturecategorybuilder_optional_elective(
2304
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
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
- cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(
2315
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2316
- size_t count) {
2317
- RustCallStatus status =
2318
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2319
- auto value =
2320
- uniffi_rusaint_fn_method_lecturecategorybuilder_recognized_other_major(
2321
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
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
- cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(
2336
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2337
- size_t count) {
2338
- RustCallStatus status =
2339
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2340
- auto value =
2341
- uniffi_rusaint_fn_method_lecturecategorybuilder_required_elective(
2342
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
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
- NativeRusaint::cpp_uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(
2353
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2354
- size_t count) {
2355
- RustCallStatus status =
2356
- uniffi::rusaint::Bridging<RustCallStatus>::rustSuccess(rt);
2357
- auto value = uniffi_rusaint_fn_method_lecturecategorybuilder_united_major(
2358
- uniffi_jsi::Bridging<void *>::fromJs(rt, callInvoker, args[0]),
2359
- uniffi::rusaint::Bridging<RustBuffer>::fromJs(rt, callInvoker, args[1]),
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
- NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_chapel(
2368
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
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
- return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2449
+
2450
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2373
2451
  }
2374
- jsi::Value NativeRusaint::
2375
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major(
2376
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2377
- size_t count) {
2378
- auto value =
2379
- uniffi_rusaint_checksum_method_lecturecategorybuilder_connected_major();
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
- NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_cyber(
2385
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
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
- return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2463
+
2464
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2390
2465
  }
2391
- jsi::Value NativeRusaint::
2392
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_education(
2393
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2394
- size_t count) {
2395
- auto value =
2396
- uniffi_rusaint_checksum_method_lecturecategorybuilder_education();
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
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture(
2402
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2403
- size_t count) {
2404
- auto value =
2405
- uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_lecture();
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
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor(
2411
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2412
- size_t count) {
2413
- auto value =
2414
- uniffi_rusaint_checksum_method_lecturecategorybuilder_find_by_professor();
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
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated(
2420
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2421
- size_t count) {
2422
- auto value =
2423
- uniffi_rusaint_checksum_method_lecturecategorybuilder_graduated();
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
- NativeRusaint::cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_major(
2429
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
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
- return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2498
+
2499
+ return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
2434
2500
  }
2435
- jsi::Value NativeRusaint::
2436
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective(
2437
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2438
- size_t count) {
2439
- auto value =
2440
- uniffi_rusaint_checksum_method_lecturecategorybuilder_optional_elective();
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
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major(
2446
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2447
- size_t count) {
2448
- auto value =
2449
- uniffi_rusaint_checksum_method_lecturecategorybuilder_recognized_other_major();
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
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective(
2455
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2456
- size_t count) {
2457
- auto value =
2458
- uniffi_rusaint_checksum_method_lecturecategorybuilder_required_elective();
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
- cpp_uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major(
2464
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2465
- size_t count) {
2466
- auto value =
2467
- uniffi_rusaint_checksum_method_lecturecategorybuilder_united_major();
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
- cpp_uniffi_rusaint_checksum_constructor_lecturecategorybuilder_new(
2473
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
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
- return uniffi_jsi::Bridging<uint16_t>::toJs(rt, callInvoker, value);
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
- jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args,
2481
- size_t count) {
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
- return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
2540
+
2541
+ return uniffi_jsi::Bridging<uint32_t>::toJs(rt, callInvoker, value);
2485
2542
  }