VecFlatten

Trait VecFlatten 

Source
pub trait VecFlatten<T2> {
    // Required method
    fn flatten(&self) -> &[T2];
}

Required Methods§

Source

fn flatten(&self) -> &[T2]

Implementations on Foreign Types§

Source§

impl<T, T2> VecFlatten<T2> for [VecType<T>]
where T: VecTypeTrait<Elem = T2>,

Useful to optimize code with vector load/store. If length of the slice is not a multiple of N, the remaining elements will be ignored.

§Safety

This is safe since VecType always has a layout
compatible with T::Elem array.

Source§

fn flatten(&self) -> &[T2]

Implementors§