Trait feanor_math::vector::VectorViewMut
source · pub trait VectorViewMut<T: ?Sized>: VectorView<T> {
// Required method
fn at_mut(&mut self, i: usize) -> &mut T;
// Provided method
fn map_mut<U, F: Fn(&T) -> &U, G: Fn(&mut T) -> &mut U>(
self,
f: F,
f_mut: G,
) -> MapMut<Self, F, G, T>
where Self: Sized { ... }
}Expand description
A trait for objects that provides mutable access to a 1-dimensional array of objects.
§Related traits
If only immutable access is provided, use crate::vector::VectorViewMut.
§Iterators
Note that we cannot provide an iter_mut() function - it is not clear that
the underlying vector allows elements at different indices to be borrowed
mutably at once (e.g. sparse implementations).
This is of course different in the immutable case.
Required Methods§
Provided Methods§
fn map_mut<U, F: Fn(&T) -> &U, G: Fn(&mut T) -> &mut U>(
self,
f: F,
f_mut: G,
) -> MapMut<Self, F, G, T>where
Self: Sized,
Object Safety§
This trait is not object safe.