pub unsafe trait MatrixMut<T>: MatrixRef<T> {
// Required methods
fn try_get_reference_mut(
&mut self,
row: Row,
column: Column,
) -> Option<&mut T>;
unsafe fn get_reference_unchecked_mut(
&mut self,
row: Row,
column: Column,
) -> &mut T;
}Expand description
Required Methods§
Sourcefn try_get_reference_mut(&mut self, row: Row, column: Column) -> Option<&mut T>
fn try_get_reference_mut(&mut self, row: Row, column: Column) -> Option<&mut T>
Gets a mutable reference to the value at the index, if the index is in range. Otherwise returns None.
Sourceunsafe fn get_reference_unchecked_mut(
&mut self,
row: Row,
column: Column,
) -> &mut T
unsafe fn get_reference_unchecked_mut( &mut self, row: Row, column: Column, ) -> &mut T
Gets a mutable reference to the value at the index without doing any bounds checking. For a safe alternative see try_get_reference_mut.
§Safety
Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used. Valid indexes are defined as in MatrixRef.
Trait Implementations§
Source§impl<T> MatrixMut<T> for Box<dyn MatrixMut<T>>
A box of a dynamic MatrixMut also implements MatrixMut.
impl<T> MatrixMut<T> for Box<dyn MatrixMut<T>>
A box of a dynamic MatrixMut also implements MatrixMut.
Source§fn try_get_reference_mut(&mut self, row: Row, column: Column) -> Option<&mut T>
fn try_get_reference_mut(&mut self, row: Row, column: Column) -> Option<&mut T>
Source§unsafe fn get_reference_unchecked_mut(
&mut self,
row: Row,
column: Column,
) -> &mut T
unsafe fn get_reference_unchecked_mut( &mut self, row: Row, column: Column, ) -> &mut T
Source§impl<T> MatrixRef<T> for Box<dyn MatrixMut<T>>
A box of a dynamic MatrixMut also implements MatrixRef.
impl<T> MatrixRef<T> for Box<dyn MatrixMut<T>>
A box of a dynamic MatrixMut also implements MatrixRef.
Source§fn try_get_reference(&self, row: Row, column: Column) -> Option<&T>
fn try_get_reference(&self, row: Row, column: Column) -> Option<&T>
Source§fn view_rows(&self) -> Row
fn view_rows(&self) -> Row
Source§fn view_columns(&self) -> Column
fn view_columns(&self) -> Column
Source§unsafe fn get_reference_unchecked(&self, row: Row, column: Column) -> &T
unsafe fn get_reference_unchecked(&self, row: Row, column: Column) -> &T
Source§fn data_layout(&self) -> DataLayout
fn data_layout(&self) -> DataLayout
impl<T> NoInteriorMutability for Box<dyn MatrixMut<T>>
A box of a dynamic MatrixMut also implements NoInteriorMutability, since NoInteriorMutability is supertrait of MatrixMut
Implementations on Foreign Types§
Source§impl<'source, T, S> MatrixMut<T> for &'source mut Swhere
S: MatrixMut<T>,
If some type implements MatrixMut, then an exclusive reference to it implements MatrixMut
as well
impl<'source, T, S> MatrixMut<T> for &'source mut Swhere
S: MatrixMut<T>,
If some type implements MatrixMut, then an exclusive reference to it implements MatrixMut as well
Source§impl<T> MatrixMut<T> for Box<dyn MatrixMut<T>>
A box of a dynamic MatrixMut also implements MatrixMut.
impl<T> MatrixMut<T> for Box<dyn MatrixMut<T>>
A box of a dynamic MatrixMut also implements MatrixMut.
Source§impl<T, S> MatrixMut<T> for Box<S>where
S: MatrixMut<T>,
A box of a MatrixMut also implements MatrixMut.
impl<T, S> MatrixMut<T> for Box<S>where
S: MatrixMut<T>,
A box of a MatrixMut also implements MatrixMut.
Implementors§
impl<'a, T> MatrixMut<T> for MatrixPart<'a, T>
A MatrixPart implements MatrixMut.
impl<'a, T, S> MatrixMut<(T, usize)> for RecordMatrix<'a, T, S>
RecordMatrix implements MatrixMut when the source does, returning mutable references to the
tuples of T and Index.
impl<T> MatrixMut<T> for Matrix<T>
A Matrix implements MatrixMut.
impl<T, S> MatrixMut<T> for MatrixRefTensor<T, S>where
S: TensorMut<T, 2>,
impl<T, S> MatrixMut<T> for MatrixMask<T, S>where
S: MatrixMut<T>,
A MatrixMask of a MatrixMut type implements MatrixMut.
impl<T, S> MatrixMut<T> for MatrixRange<T, S>where
S: MatrixMut<T>,
A MatrixRange of a MatrixMut type implements MatrixMut.
impl<T, S> MatrixMut<T> for MatrixReverse<T, S>where
S: MatrixMut<T>,
A MatrixReverse implements MatrixMut, with the dimension names the MatrixReverse was created with iterating in reverse order compared to the dimension names in the original source.