Trait vtable::VTableMetaDropInPlace [−][src]
pub unsafe trait VTableMetaDropInPlace: VTableMeta { 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
Required methods
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.