Skip to main content

copy_bytes

Function copy_bytes 

Source
pub fn copy_bytes(dst: &mut [u8], src: &[u8]) -> Result<(), ProgramError>
Expand description

Copy bytes from one slice to another (no overlap).

Copies src.len() bytes into the front of dst. Returns Err(InvalidArgument) if dst is shorter than src; a longer dst keeps its trailing bytes unchanged.