Function re_viewer::external::arrow2::ffi::mmap::slice

pub unsafe fn slice<T>(slice: &[T]) -> PrimitiveArray<T>
where T: NativeType,
Expand description

Creates a (non-null) PrimitiveArray from a slice of values. This does not have memcopy and is the fastest way to create a PrimitiveArray.

This can be useful if you want to apply arrow kernels on slices without incurring a memcopy cost.

§Safety

Using this function is not unsafe, but the returned PrimitiveArray’s lifetime is bound to the lifetime of the slice. The returned PrimitiveArray must not outlive the passed slice.