pub trait RawClone {
    // Required method
    unsafe fn raw_clone(src: *const c_void, dst: *mut c_void);

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

Trait implemented automatically for types that implement Clone and can be used to clone the type through raw pointers.

Required Methods§

unsafe fn raw_clone(src: *const c_void, dst: *mut c_void)

Write the default value of the type to the pointer.

Safety

The dst pointer must be aligned, writable, and have the same layout that this function is assocated to, and the src pointer must be readable and point to a valid instance of the type that this function is associated with.

Provided Methods§

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

Get a callback suitable for [SchemaData].

Object Safety§

This trait is not object safe.

Implementors§

§

impl<T> RawClone for Twhere T: Clone,