Trait VTableMetaDropInPlace Copy item path Source pub unsafe trait VTableMetaDropInPlace: VTableMeta {
// Required methods
unsafe fn drop_in_place (vtable: &Self::VTable , ptr: *mut u8 ) -> Layout ;
unsafe fn dealloc (vtable: &Self::VTable , ptr: *mut u8 , layout: Layout );
}Expand description This trait is implemented by the #[vtable] macro.
It is implemented if the macro has a “drop_in_place” function.
§ Safety
The implementation of drop_in_place and dealloc must be correct
§ Safety
The target ptr argument needs to be pointing to a an instance of the VTable
after the call to this function, the memory is still there but no longer contains
a valid object.
§ Safety
The target ptr must have been allocated by the same allocator as the
one which the vtable will delegate to.
This trait is not dyn compatible .
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.