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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Opaque
impl RefUnwindSafe for Opaque
impl Send for Opaque
impl Sync for Opaque
impl Unpin for Opaque
impl UnwindSafe for Opaque
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more