Trait bevy_rapier2d::prelude::nalgebra::base::storage::StorageMut [−][src]
pub unsafe trait StorageMut<T, R, C = Const<1_usize>>: Storage<T, R, C> where
C: Dim,
T: Scalar,
R: Dim, { fn ptr_mut(&mut self) -> *mut T; fn as_mut_slice(&mut self) -> &mut [T]; unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut T { ... } unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut T { ... } unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut T { ... } unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut T { ... } unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize) { ... } unsafe fn swap_unchecked(
&mut self,
row_col1: (usize, usize),
row_col2: (usize, usize)
) { ... } }
Expand description
Trait implemented by matrix data storage that can provide a mutable access to its elements.
Note that a mutable access does not mean that the matrix owns its data. For example, a mutable matrix slice can provide mutable access to its elements even if it does not own its data (it contains only an internal reference to them).
Required methods
fn as_mut_slice(&mut self) -> &mut [T]
[src]
fn as_mut_slice(&mut self) -> &mut [T]
[src]Retrieves the mutable data buffer as a contiguous slice.
Matrix components may not be contiguous, depending on its strides.
Provided methods
unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut T
[src]
unsafe fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut T
[src]Gets the mutable address of the i-th matrix component without performing bound-checking.
unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut T
[src]
unsafe fn get_address_unchecked_mut(
&mut self,
irow: usize,
icol: usize
) -> *mut T
[src]Gets the mutable address of the i-th matrix component without performing bound-checking.
unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut T
[src]
unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut T
[src]Retrieves a mutable reference to the i-th element without bound-checking.
unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut T
[src]
unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut T
[src]Retrieves a mutable reference to the element at (irow, icol)
without bound-checking.
unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)
[src]
unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)
[src]Swaps two elements using their linear index without bound-checking.
Implementors
impl<'a, T, R, C, RStride, CStride> StorageMut<T, R, C> for SliceStorageMut<'a, T, R, C, RStride, CStride> where
C: Dim,
T: Scalar,
R: Dim,
RStride: Dim,
CStride: Dim,
[src]
impl<'a, T, R, C, RStride, CStride> StorageMut<T, R, C> for SliceStorageMut<'a, T, R, C, RStride, CStride> where
C: Dim,
T: Scalar,
R: Dim,
RStride: Dim,
CStride: Dim,
[src]impl<T, C> StorageMut<T, Dynamic, C> for VecStorage<T, Dynamic, C> where
C: Dim,
T: Scalar,
DefaultAllocator: Allocator<T, Dynamic, C>,
<DefaultAllocator as Allocator<T, Dynamic, C>>::Buffer == VecStorage<T, Dynamic, C>,
[src]
impl<T, C> StorageMut<T, Dynamic, C> for VecStorage<T, Dynamic, C> where
C: Dim,
T: Scalar,
DefaultAllocator: Allocator<T, Dynamic, C>,
<DefaultAllocator as Allocator<T, Dynamic, C>>::Buffer == VecStorage<T, Dynamic, C>,
[src]impl<T, R> StorageMut<T, R, Dynamic> for VecStorage<T, R, Dynamic> where
T: Scalar,
R: DimName,
DefaultAllocator: Allocator<T, R, Dynamic>,
<DefaultAllocator as Allocator<T, R, Dynamic>>::Buffer == VecStorage<T, R, Dynamic>,
[src]
impl<T, R> StorageMut<T, R, Dynamic> for VecStorage<T, R, Dynamic> where
T: Scalar,
R: DimName,
DefaultAllocator: Allocator<T, R, Dynamic>,
<DefaultAllocator as Allocator<T, R, Dynamic>>::Buffer == VecStorage<T, R, Dynamic>,
[src]impl<T, const R: usize, const C: usize> StorageMut<T, Const<R>, Const<C>> for ArrayStorage<T, R, C> where
T: Scalar,
DefaultAllocator: Allocator<T, Const<R>, Const<C>>,
<DefaultAllocator as Allocator<T, Const<R>, Const<C>>>::Buffer == ArrayStorage<T, R, C>,
[src]
impl<T, const R: usize, const C: usize> StorageMut<T, Const<R>, Const<C>> for ArrayStorage<T, R, C> where
T: Scalar,
DefaultAllocator: Allocator<T, Const<R>, Const<C>>,
<DefaultAllocator as Allocator<T, Const<R>, Const<C>>>::Buffer == ArrayStorage<T, R, C>,
[src]