pub fn copy_slice_to_buffer<T>( buffer: *mut c_void, data: &[T], ) -> Result<(), AbiError>
Performs a raw memory copy from a Rust slice into a raw buffer.