Skip to main content

to_shmem_slice_ptr

Function to_shmem_slice_ptr 

Source
pub(crate) unsafe fn to_shmem_slice_ptr<'a, T>(
    src: impl ExactSizeIterator<Item = &'a T>,
    dest: *mut T,
    builder: &mut SharedMemoryBuilder,
) -> Result<*mut [T], String>
where T: ToShmem + 'a,
Expand description

Converts all the items in src into shared memory form, writes them into the specified buffer, and returns a pointer to the slice.

ยงSafety

Dest must have enough space for all elements in src.