VectorArray

Trait VectorArray 

Source
pub trait VectorArray<T: ?Sized, const D: usize, V: Vector<T, D>, I>: Sized {
    // Required methods
    fn get<'a>(&'a self, index: I) -> Option<&'a V>;
    fn get_mut<'a>(&'a mut self, index: I) -> Option<&'a mut V>;

    // Provided methods
    fn vec_split_safe<'a>(&'a self) -> [SafeAccessor<'a, T, D, V, I, Self>; D] { ... }
    fn vec_split_safe_mut<'a>(
        &'a mut self,
    ) -> [SafeAccessorMut<'a, T, D, V, I, Self>; D] { ... }
}
Expand description

Trait to be implemented for all types that are arrays of some sort and contain only vectors.

Required Methods§

Source

fn get<'a>(&'a self, index: I) -> Option<&'a V>

Source

fn get_mut<'a>(&'a mut self, index: I) -> Option<&'a mut V>

Provided Methods§

Source

fn vec_split_safe<'a>(&'a self) -> [SafeAccessor<'a, T, D, V, I, Self>; D]

Source

fn vec_split_safe_mut<'a>( &'a mut self, ) -> [SafeAccessorMut<'a, T, D, V, I, Self>; D]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T, const D: usize, V: Vector<T, D>> VectorArray<T, D, V, usize> for Vec<V>

Source§

fn get<'a>(&'a self, index: usize) -> Option<&'a V>

Source§

fn get_mut<'a>(&'a mut self, index: usize) -> Option<&'a mut V>

Source§

impl<T: ?Sized, const D: usize, V: Vector<T, D>> VectorArray<T, D, V, usize> for &mut [V]

Source§

fn get<'a>(&'a self, index: usize) -> Option<&'a V>

Source§

fn get_mut<'a>(&'a mut self, index: usize) -> Option<&'a mut V>

Source§

impl<T: ?Sized, const D: usize, V: Vector<T, D>, const A: usize> VectorArray<T, D, V, usize> for [V; A]

Source§

fn get<'a>(&'a self, index: usize) -> Option<&'a V>

Source§

fn get_mut<'a>(&'a mut self, index: usize) -> Option<&'a mut V>

Implementors§