Get method information for all registered methods.
291 {
292 fl::vector<MethodInfo>
result;
293
294
295
296 fl::json jsonMethods =
mRpc.methods();
297
300 }
301
302
303 for (fl::size i = 0; i < jsonMethods.
size(); i++) {
304 fl::json method = jsonMethods[i];
305
307 continue;
308 }
309
311
312
313 info.name = method[0].
as_string().value_or(
"");
314
315
316 info.returnType = method[1].
as_string().value_or(
"void");
317
318
319 if (method[2].is_array()) {
320 fl::json params = method[2];
321 for (fl::size j = 0; j < params.
size(); j++) {
322 fl::json param = params[j];
325 paramInfo.name = param[0].
as_string().value_or(
"");
326 paramInfo.type = param[1].
as_string().value_or(
"unknown");
327 info.params.push_back(
fl::move(paramInfo));
328 }
329 }
330 }
331
332
333 info.description = "";
334 info.tags.clear();
335
337 }
338
340}
fl::MethodInfo MethodInfo
bool is_array() const FL_NOEXCEPT
size_t size() const FL_NOEXCEPT
fl::optional< fl::string > as_string() const FL_NOEXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)