Trait BoxedMemoryManager

Source
pub trait BoxedMemoryManager<T>: 'static {
    // Required methods
    unsafe fn copy(ptr: *const T) -> *mut T;
    unsafe fn free(ptr: *mut T);
    unsafe fn init(ptr: *mut T);
    unsafe fn clear(ptr: *mut T);
}
Expand description

Memory management functions for a boxed type.

Required Methods§

Source

unsafe fn copy(ptr: *const T) -> *mut T

Makes a copy.

Source

unsafe fn free(ptr: *mut T)

Frees the object.

Source

unsafe fn init(ptr: *mut T)

Initializes an already allocated object.

Source

unsafe fn clear(ptr: *mut T)

Clears and frees all memory of the object, but not the object itself.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§