[][src]Trait rtrb::CopyToUninit

pub trait CopyToUninit<T: Copy> {
    pub fn copy_to_uninit(&self, dst: &mut [MaybeUninit<T>]);
}

Extension trait used to provide a copy_to_uninit() method on built-in slices.

This can be used to safely copy data to the slices returned from WriteChunkUninit::as_mut_slices().

To use this, the trait has to be brought into scope, e.g. with:

use rtrb::CopyToUninit;

Required methods

pub fn copy_to_uninit(&self, dst: &mut [MaybeUninit<T>])[src]

Copies contents to a possibly uninitialized slice.

Loading content...

Implementations on Foreign Types

impl<T: Copy> CopyToUninit<T> for [T][src]

pub fn copy_to_uninit(&self, dst: &mut [MaybeUninit<T>])[src]

Copies contents to a possibly uninitialized slice.

Panics

This function will panic if the two slices have different lengths.

Loading content...

Implementors

Loading content...