Expand description
Wraps mutable image data slices, tagging them with a Color type
Implementations
sourceimpl<'a, T: Type, C: Color> DataMut<'a, T, C>
impl<'a, T: Type, C: Color> DataMut<'a, T, C>
sourcepub fn num_pixels(&self) -> usize
pub fn num_pixels(&self) -> usize
Get the number of pixels availible
sourcepub fn copy_from_slice(&mut self, slice: impl AsRef<[T]>)
pub fn copy_from_slice(&mut self, slice: impl AsRef<[T]>)
Copy values from slice
sourcepub fn as_slice(&self) -> &[T]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn as_slice(&self) -> &[T]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Get inner slice
Trait Implementations
sourceimpl<'a, T: 'a + Type, C: 'a + Color> IntoIterator for DataMut<'a, T, C>
impl<'a, T: 'a + Type, C: 'a + Color> IntoIterator for DataMut<'a, T, C>
sourceimpl<'a, T: PartialEq + 'a + Type, C: PartialEq + 'a + Color> PartialEq<DataMut<'a, T, C>> for DataMut<'a, T, C>
impl<'a, T: PartialEq + 'a + Type, C: PartialEq + 'a + Color> PartialEq<DataMut<'a, T, C>> for DataMut<'a, T, C>
sourceimpl<'a, T: PartialOrd + 'a + Type, C: PartialOrd + 'a + Color> PartialOrd<DataMut<'a, T, C>> for DataMut<'a, T, C>
impl<'a, T: PartialOrd + 'a + Type, C: PartialOrd + 'a + Color> PartialOrd<DataMut<'a, T, C>> for DataMut<'a, T, C>
sourcefn partial_cmp(&self, other: &DataMut<'a, T, C>) -> Option<Ordering>
fn partial_cmp(&self, other: &DataMut<'a, T, C>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<'a, T: 'a + Type, C: 'a + Color> StructuralPartialEq for DataMut<'a, T, C>
Auto Trait Implementations
impl<'a, T, C> RefUnwindSafe for DataMut<'a, T, C> where
C: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, C> Send for DataMut<'a, T, C>
impl<'a, T, C> Sync for DataMut<'a, T, C>
impl<'a, T, C> Unpin for DataMut<'a, T, C>
impl<'a, T, C> !UnwindSafe for DataMut<'a, T, C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more