Trait nalgebra::base::storage::ContiguousStorageMut [−][src]
pub unsafe trait ContiguousStorageMut<T: Scalar, R: Dim, C: Dim = U1>: ContiguousStorage<T, R, C> + StorageMut<T, R, C> { fn as_mut_slice(&mut self) -> &mut [T] { ... } }
Expand description
A mutable matrix storage that is stored contiguously in memory.
The storage requirement means that for any value of i
in [0, nrows * ncols - 1]
, the value
.get_unchecked_linear
returns one of the matrix component. This trait is unsafe because
failing to comply to this may cause Undefined Behaviors.
Provided methods
fn as_mut_slice(&mut self) -> &mut [T]
fn as_mut_slice(&mut self) -> &mut [T]
Converts this data storage to a contiguous mutable slice.
Implementors
impl<'a, T: Scalar, R: Dim, CStride: Dim> ContiguousStorageMut<T, R, Const<1_usize>> for SliceStorageMut<'a, T, R, U1, U1, CStride>
impl<'a, T: Scalar, R: DimName, C: Dim + IsNotStaticOne> ContiguousStorageMut<T, R, C> for SliceStorageMut<'a, T, R, C, U1, R>
impl<T, const R: usize, const C: usize> ContiguousStorageMut<T, Const<R>, Const<C>> for ArrayStorage<T, R, C> where
T: Scalar,
DefaultAllocator: Allocator<T, Const<R>, Const<C>, Buffer = Self>,
impl<T: Scalar, C: Dim> ContiguousStorageMut<T, Dynamic, C> for VecStorage<T, Dynamic, C> where
DefaultAllocator: Allocator<T, Dynamic, C, Buffer = Self>,
impl<T: Scalar, R: DimName> ContiguousStorageMut<T, R, Dynamic> for VecStorage<T, R, Dynamic> where
DefaultAllocator: Allocator<T, R, Dynamic, Buffer = Self>,