Trait cpp_utils::CppDeletable
source · Expand description
Indicates that the type can be put into a CppBox.
Example of implementation:
use cpp_utils::{CppDeletable, Deleter};
struct Struct1;
unsafe extern "C" fn struct1_delete(this_ptr: *mut Struct1) {
unimplemented!()
}
impl CppDeletable for Struct1 {
fn deleter() -> Deleter<Self> {
struct1_delete
}
}