"typedef void (*c_fn_i324232mut3232c_void_t)(int32_t, void *);"; r#"struct CFnOncei32 { c_fn_i324232mut3232c_void_t cb; void * ctx; };"#; "static std::future call_fn() noexcept;"; r#"template inline std::future TestFutureWrapper::call_fn() noexcept { auto tmp = new std::promise; auto f = tmp->get_future(); struct CFnOncei32 a0; a0.ctx = tmp; a0.cb = [](int32_t arg, void *opaque) { auto arg_cpp = arg; auto promise = static_cast *>(opaque); promise->set_value(std::move(arg_cpp)); delete promise; }; TestFuture_call_fn(std::move(a0)); return f; }"#; "typedef void (*c_fn_CRustResulti32CRustString4232mut3232c_void_t)(CRustResulti32CRustString, void *);"; "static std::future> call_fn2() noexcept;"; r#"template inline std::future> TestFutureWrapper::call_fn2() noexcept { auto tmp = new std::promise>; auto f = tmp->get_future(); struct CFnOnceCRustResulti32CRustString a0; a0.ctx = tmp; a0.cb = [](CRustResulti32CRustString arg, void *opaque) { auto arg_cpp = arg.is_ok != 0 ? std::variant { arg.data.ok } : std::variant { RustString{arg.data.err} }; auto promise = static_cast> *>(opaque); promise->set_value(std::move(arg_cpp)); delete promise; }; TestFuture_call_fn2(std::move(a0)); return f; }"#;