Trait vizia_core::vg::wrapper::PointerWrapper
pub unsafe trait PointerWrapper<N>: Sized {
// Required methods
fn wrap(ptr: *mut N) -> Option<Self>;
fn unwrap(self) -> *mut N;
fn inner(&self) -> &N;
fn inner_mut(&mut self) -> &mut N;
}
Expand description
This trait supports the conversion of a wrapper into it’s wrapped C/C++ pointer and back.
The wrapped value can be accessed through the functions inner
and inner_mut
.
§Safety
The native value N
should be treated as opaque, because its definition may change
without adhering to semantic versioning and depends on what the tool bindgen is able to generate.
Converting from a Rust wrapper to the wrapped value loses the automatic ability to free associated resources.
Required Methods§
Object Safety§
This trait is not object safe.