Skip to main content

WithinBox

Trait WithinBox 

Source
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§

Source

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.

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<N, T> WithinBox for N
where N: New<Output = T>,

Source§

type Inner = T