pub trait Vector<T: ?Sized, const D: usize> {
// Required methods
fn get<'a>(&'a self, i: usize) -> Option<&'a T>;
fn get_mut<'a>(&'a mut self, i: usize) -> Option<&'a mut T>;
}Expand description
Trait to be implemented for all types that are vector-like. For example, arrays, tuples, vecs, etc.
Required Methods§
fn get<'a>(&'a self, i: usize) -> Option<&'a T>
fn get_mut<'a>(&'a mut self, i: usize) -> Option<&'a mut T>
Implementations on Foreign Types§
Source§impl<T, const D: usize> Vector<T, D> for Vec<T>
no RawVector here, as Vec is not aligned properly for that.
impl<T, const D: usize> Vector<T, D> for Vec<T>
no RawVector here, as Vec is not aligned properly for that.