namespace internal {
class Result;
}
class Result {
public:
Result();
private:
std::shared_ptr<internal::Result> d_result;
};
Is there a way to expose this in Rust in a way equivalent to
struct Result {
p: SharedPtr<Opaque>,
}
An implementation like this example gives the error "type Result should be trivially move constructible and trivially destructible in C++ to be used as a return value of newResult in Rust"
I cannot change the C++ header and I don't want to add another layer of indirection by wrapping Result as an opaque class in a shared pointer.
For example, consider a class like this:
Is there a way to expose this in Rust in a way equivalent to
An implementation like this example gives the error "type Result should be trivially move constructible and trivially destructible in C++ to be used as a return value of
newResult
in Rust"I cannot change the C++ header and I don't want to add another layer of indirection by wrapping
Result
as an opaque class in a shared pointer.