Type Definition imgref::ImgRefMut [−][src]
type ImgRefMut<'a, Pixel> = Img<&'a mut [Pixel]>;
Same as ImgRef
, but mutable
Pass this structure by value (i.e. ImgRef
, not &ImgRef
).
Implementations
impl<'a, T> ImgRefMut<'a, T>
[src]
#[must_use]pub fn sub_image(
&'a mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRef<'a, T>
[src]
&'a mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRef<'a, T>
Turn this into immutable reference, and slice a subregion of it
#[must_use]pub fn sub_image_mut(
&mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRefMut<'_, T>
[src]
&mut self,
left: usize,
top: usize,
width: usize,
height: usize
) -> ImgRefMut<'_, T>
Trim this image without copying. Note that mutable borrows are exclusive, so it’s not possible to have more than one mutable subimage at a time.
#[must_use]pub fn as_ref(&self) -> ImgRef<'_, T>
[src]
Make mutable reference immutable
impl<'a, T: Copy> ImgRefMut<'a, T>
[src]
#[must_use]pub fn pixels(&self) -> PixelsIter<'_, T>ⓘNotable traits for PixelsIter<'a, T>
impl<'a, T: Copy + 'a> Iterator for PixelsIter<'a, T> type Item = T;
[src]
Notable traits for PixelsIter<'a, T>
impl<'a, T: Copy + 'a> Iterator for PixelsIter<'a, T> type Item = T;
Panics
if width is 0
#[must_use]pub fn pixels_mut(&mut self) -> PixelsIterMut<'_, T>ⓘNotable traits for PixelsIterMut<'a, T>
impl<'a, T: Copy + 'a> Iterator for PixelsIterMut<'a, T> type Item = &'a mut T;
[src]
Notable traits for PixelsIterMut<'a, T>
impl<'a, T: Copy + 'a> Iterator for PixelsIterMut<'a, T> type Item = &'a mut T;
Panics
if width is 0
impl<'a, T> ImgRefMut<'a, T>
[src]
#[must_use]pub fn rows(&self) -> RowsIter<'_, T>ⓘ
[src]
Panics
if stride is 0
#[must_use]pub fn rows_mut(&mut self) -> RowsIterMut<'_, T>ⓘNotable traits for RowsIterMut<'a, T>
impl<'a, T: 'a> Iterator for RowsIterMut<'a, T> type Item = &'a mut [T];
[src]
Notable traits for RowsIterMut<'a, T>
impl<'a, T: 'a> Iterator for RowsIterMut<'a, T> type Item = &'a mut [T];
Panics
if stride is 0
Trait Implementations
impl<'a, T: Eq> Eq for ImgRefMut<'a, T>
[src]
impl<'a, T: Hash> Hash for ImgRefMut<'a, T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'a, 'b, T, U> PartialEq<Img<&'b [U]>> for ImgRefMut<'a, T> where
T: PartialEq<U>,
[src]
T: PartialEq<U>,
fn eq(&self, other: &ImgRef<'b, U>) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a, 'b, T, U> PartialEq<Img<&'b mut [U]>> for ImgRefMut<'a, T> where
T: PartialEq<U>,
[src]
T: PartialEq<U>,