pub trait CppDeletable: Sized {
    fn deleter() -> Deleter<Self>;
}
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
  }
}

Required Methods

Returns deleter function for this type.

Implementors