Function safemem::copy_over [−][src]
pub fn copy_over<T: Copy>(
slice: &mut [T],
src_idx: usize,
dest_idx: usize,
len: usize
)
Expand description
Copy len
elements from src_idx
to dest_idx
. Ranges may overlap.
Safe wrapper for memmove()
/std::ptr::copy()
.
###Panics
- If either
src_idx
ordest_idx
are out of bounds, or if either of these pluslen
is out of bounds. - If
src_idx + len
ordest_idx + len
overflows.