pub trait WithinBox {
type Inner;
// Required methods
fn within_box(self) -> Pin<Box<Self::Inner>>;
fn within_cpp_pin(self) -> CppPin<Self::Inner>;
}
Expand description
Provides utility functions to emplace any moveit::New
into a
Box
. Automatically imported by the autocxx prelude
and implemented by any (autocxx-related) moveit::New
.
Required Associated Types§
Required Methods§
Sourcefn within_box(self) -> Pin<Box<Self::Inner>>
fn within_box(self) -> Pin<Box<Self::Inner>>
Create this item inside a pinned box. This is a good option if you want to own this object within Rust, and want to create Rust references to it.
Sourcefn within_cpp_pin(self) -> CppPin<Self::Inner>
fn within_cpp_pin(self) -> CppPin<Self::Inner>
Create this item inside a CppPin
. This is a good option if you
want to own this option within Rust, but you want to create CppRef
C++ references to it. You’d only want to choose that option if you have
enabled the C++ reference wrapper support by using the
safety!(unsafe_references_wrapped
) directive. If you haven’t done
that, ignore this function.