Function pmem::ptr::copy [] [src]

pub unsafe fn copy<T>(src: *const T, pmemdest: *mut T, count: usize)

Copies count * size_of<T> bytes from src to pmemdest. The source and destination may overlap.

copy is semantically equivalent to C's memmove and is optimized for persitent memory.

Ensures that the result has been flushed to persistence before returning.

Safety

Care must be taken with the ownership of src and pmemdest. This method semantically moves the values of src into pmemdest. However it does not drop the contents of pmemdest, or prevent the contents of src from being dropped or used.