pub struct Layer<C> { /* private fields */ }
Expand description
Image with top left corner at (x, y) coordinates
Implementations§
Trait Implementations§
Source§impl<C> Image for Layer<C>
impl<C> Image for Layer<C>
Source§fn get(&self, row: usize, col: usize) -> Option<&Self::Pixel>
fn get(&self, row: usize, col: usize) -> Option<&Self::Pixel>
Get pixel at the specified row and column
Source§fn view(
&self,
row_min: usize,
row_max: usize,
col_min: usize,
col_max: usize,
) -> ImageRef<'_, Self::Pixel>
fn view( &self, row_min: usize, row_max: usize, col_min: usize, col_max: usize, ) -> ImageRef<'_, Self::Pixel>
Create sub-image bounded by constraints,
_max
values are not inclusive.Source§fn as_ref(&self) -> ImageRef<'_, Self::Pixel>
fn as_ref(&self) -> ImageRef<'_, Self::Pixel>
Create immutable view to the image of the concrete type of
ImageRef
fn write(self, fmt: ImageWriteFormat, out: impl Write) -> Result<(), Error>
Source§impl<C> ImageMut for Layer<C>
impl<C> ImageMut for Layer<C>
Source§fn 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
Source§fn 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.Source§fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel>
fn as_mut(&mut self) -> ImageMutRef<'_, Self::Pixel>
Create concrete type reference to the image
Auto Trait Implementations§
impl<C> Freeze for Layer<C>
impl<C> RefUnwindSafe for Layer<C>where
C: RefUnwindSafe,
impl<C> Send for Layer<C>where
C: Send,
impl<C> Sync for Layer<C>where
C: Sync,
impl<C> Unpin for Layer<C>where
C: Unpin,
impl<C> UnwindSafe for Layer<C>where
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more