pub enum Opaque {}
Expand description
An opaque type which cannot be passed or held by value within Rust.
Rust’s move semantics are such that every move is equivalent to a memcpy. This is incompatible in general with C++’s constructor-based move semantics, so a C++ type which has a destructor or nontrivial move constructor must never exist by value in Rust. In CXX, such types are called opaque C++ types.
When passed across an FFI boundary, an opaque C++ type must be behind an indirection such as a reference or UniquePtr.