vec_dimension_shift

Trait VecDimensionShift2D

Source
pub trait VecDimensionShift2D<T> {
    // Required methods
    fn as_2d_array_no_check(self) -> Vec<[T; 2]>;
    fn to_2d_array_no_check(&self) -> Vec<[T; 2]>;
    fn as_2d_array(self) -> Result<Vec<[T; 2]>, Vec<T>>;
    fn to_2d_array(&self) -> Result<Vec<[T; 2]>, &Vec<T>>;
    fn as_2d_array_truncate(self) -> Vec<[T; 2]>;
    fn to_2d_array_truncate(&mut self) -> Vec<[T; 2]>;
    fn as_2d_array_padding(self, v: T) -> Vec<[T; 2]>;
    fn to_2d_array_padding(&mut self, v: T) -> Vec<[T; 2]>;
}

Required Methods§

Implementations on Foreign Types§

Source§

impl<T: Clone + Default> VecDimensionShift2D<T> for Vec<T>

Implementors§