Function safemem::copy_over [] [src]

pub fn copy_over<T: Copy>(
    slice: &mut [T],
    src_idx: usize,
    dest_idx: usize,
    len: usize
)

Copy len elements from src_idx to dest_idx. Ranges may overlap.

Safe wrapper for memmove()/std::ptr::copy().

Panics

  • If either src_idx or dest_idx are out of bounds, or if either of these plus len is out of bounds.
  • If src_idx + len or dest_idx + len overflows.