#[no_mangle]
pub extern "C" fn nstd_heap_ptr_clone<'a>(
    hptr: &NSTDHeapPtr<'a>
) -> NSTDOptionalHeapPtr<'a>
Available on crate feature heap_ptr only.
Expand description

Creates a clone of a heap allocated object.

Parameters:

  • const NSTDHeapPtr *hptr - The heap pointer.

Returns

NSTDOptionalHeapPtr cloned - A new clone of the original heap object, or an uninitialized “none” variant if allocating fails.