Trait bones_schema::raw_fns::RawDrop

source ·
pub trait RawDrop {
    // Required method
    unsafe fn raw_drop(ptr: *mut c_void);

    // Provided method
    fn raw_drop_cb(    ) -> Unsafe<&'static (dyn Fn(*mut c_void) + Sync + Send + 'static)> { ... }
}
Expand description

Trait implemented automatically for types that implement Drop and can be used to drop the type through a raw pointer.

Required Methods§

source

unsafe fn raw_drop(ptr: *mut c_void)

Write the default value of the type to the pointer.

§Safety

The pointer must be aligned, writable, and have the same layout that this function is assocated to.

Provided Methods§

source

fn raw_drop_cb() -> Unsafe<&'static (dyn Fn(*mut c_void) + Sync + Send + 'static)>

Get a callback suitable for SchemaData.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> RawDrop for T