Trait feanor_math::vector::VectorView
source · pub trait VectorView<T: ?Sized> {
// Required methods
fn len(&self) -> usize;
fn at(&self, i: usize) -> &T;
// Provided methods
fn map<U: ?Sized, F: Fn(&T) -> &U>(self, f: F) -> Map<Self, F, T>
where Self: Sized { ... }
fn stride(self, stride: usize) -> Stride<T, Self>
where Self: Sized { ... }
fn chain<V>(self, rhs: V) -> Chain<Self, V, T>
where Self: Sized,
V: VectorView<T> { ... }
fn as_el_fn<R>(self, ring: R) -> RingElVectorViewFn<R, Self, T>
where Self: Sized,
R: RingStore,
R::Type: RingBase<Element = T>,
T: Sized { ... }
fn iter<'a>(&'a self) -> VectorViewIter<'a, Self, T> ⓘ { ... }
}Expand description
A trait for objects that provides read access to a 1-dimensional array of objects.
§Related traits
If the entries are not owned by the object, but e.g. produced on the fly, or just “associated” in a more general sense, the trait vec_fn::VectorFn can be used. Furthermore, for mutable access, use VectorViewMut.
Required Methods§
Provided Methods§
fn map<U: ?Sized, F: Fn(&T) -> &U>(self, f: F) -> Map<Self, F, T>where
Self: Sized,
fn stride(self, stride: usize) -> Stride<T, Self>where
Self: Sized,
fn chain<V>(self, rhs: V) -> Chain<Self, V, T>where
Self: Sized,
V: VectorView<T>,
fn as_el_fn<R>(self, ring: R) -> RingElVectorViewFn<R, Self, T>
fn iter<'a>(&'a self) -> VectorViewIter<'a, Self, T> ⓘ
Object Safety§
This trait is not object safe.