Skip to main content

copy_safe

Function copy_safe 

Source
pub fn copy_safe<T>(src: &[T], dst: &mut [T]) -> usize
where T: Copy,
Expand description

Copy data from one slice to another with bounds checking

§Arguments

  • src - Source slice
  • dst - Destination slice

§Returns

The number of elements copied