Function presser::copy_to_offset
source · [−]pub fn copy_to_offset<T: Copy, S: Slab>(
src: &T,
dst: &mut S,
start_offset: usize
) -> Result<CopyRecord, CopyError>Expand description
Copies src into the memory represented by dst starting at a minimum location
of start_offset bytes past the start of dst.
start_offsetis the offset into the allocation represented byself, in bytes, before which any copied data will certainly not be placed. However, the actual beginning of the copied data may not be exactly atstart_offsetif padding bytes are needed to satisfy alignment requirements. The actual beginning of the copied bytes is contained in the returnedCopyRecord.
Safety
This function is safe on its own, however it is very possible to do unsafe things if you read the copied data in the wrong way. See the crate-level Safety documentation for more.