Closed boluoyu closed 5 months ago
Have the following code:
struct NetClient; impl NetClient { fn start_run(self) { ... } } #[cxx::bridge] pub mod ffi_rust_cpp { extern "Rust" { type NetClient; fn start_run(self); //error: unsupported method receiver } }
What should I do?I need your help.
C++ does not have any equivalent for moving self into a member function call. There is no such thing as by-value this. You need to not use that in methods that need to be called from C++.
self
this
Have the following code:
What should I do?I need your help.