Function pmem::nodrain::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.
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.