1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
use super::{MatrixSlice, MatrixSliceMut}; use super::{Row, RowMut, Column, ColumnMut}; use std::ops::{Deref, DerefMut}; impl<'a, T: 'a> Deref for Row<'a, T> { type Target = MatrixSlice<'a, T>; fn deref(&self) -> &MatrixSlice<'a, T> { &self.row } } impl<'a, T: 'a> Deref for RowMut<'a, T> { type Target = MatrixSliceMut<'a, T>; fn deref(&self) -> &MatrixSliceMut<'a, T> { &self.row } } impl<'a, T: 'a> DerefMut for RowMut<'a, T> { fn deref_mut(&mut self) -> &mut MatrixSliceMut<'a, T> { &mut self.row } } impl<'a, T: 'a> Deref for Column<'a, T> { type Target = MatrixSlice<'a, T>; fn deref(&self) -> &MatrixSlice<'a, T> { &self.col } } impl<'a, T: 'a> Deref for ColumnMut<'a, T> { type Target = MatrixSliceMut<'a, T>; fn deref(&self) -> &MatrixSliceMut<'a, T> { &self.col } } impl<'a, T: 'a> DerefMut for ColumnMut<'a, T> { fn deref_mut(&mut self) -> &mut MatrixSliceMut<'a, T> { &mut self.col } }