pub trait ImageMut: Image {
// Required method
fn data_mut(&mut self) -> &mut [Self::Pixel];
// Provided methods
fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut Self::Pixel> { ... }
fn view_mut(
&mut self,
row_min: usize,
row_max: usize,
col_min: usize,
col_max: usize
) -> ImageMutRef<'_, Self::Pixel> { ... }
fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel> { ... }
fn clear(&mut self)
where Self::Pixel: Default { ... }
fn iter_mut(&mut self) -> ImageMutIter<'_, Self::Pixel> ⓘ { ... }
}
Expand description
Mutable image interface
Required Methods§
Provided Methods§
sourcefn get_mut(&mut self, row: usize, col: usize) -> Option<&mut Self::Pixel>
fn get_mut(&mut self, row: usize, col: usize) -> Option<&mut Self::Pixel>
Get a mutable reference to the specified pixel
sourcefn view_mut(
&mut self,
row_min: usize,
row_max: usize,
col_min: usize,
col_max: usize
) -> ImageMutRef<'_, Self::Pixel>
fn view_mut( &mut self, row_min: usize, row_max: usize, col_min: usize, col_max: usize ) -> ImageMutRef<'_, Self::Pixel>
Create mutable sub-image bounded by constraints, _max
values are not inclusive.
sourcefn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel>
fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel>
Create concrete type reference to the image
sourcefn iter_mut(&mut self) -> ImageMutIter<'_, Self::Pixel> ⓘ
fn iter_mut(&mut self) -> ImageMutIter<'_, Self::Pixel> ⓘ
Create iterator over mutable references to all the pixel of the image