pub struct MaybePixel {
pub color: Option<PixelColor>,
/* private fields */
}Expand description
A pixel that may not have any effect on the color at this position.
Fields§
§color: Option<PixelColor>Trait Implementations§
Source§impl Clone for MaybePixel
impl Clone for MaybePixel
Source§fn clone(&self) -> MaybePixel
fn clone(&self) -> MaybePixel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MaybePixel
impl Debug for MaybePixel
Source§impl Ord for MaybePixel
impl Ord for MaybePixel
Source§fn cmp(&self, other: &MaybePixel) -> Ordering
fn cmp(&self, other: &MaybePixel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MaybePixel
impl PartialEq for MaybePixel
Source§impl PartialOrd for MaybePixel
impl PartialOrd for MaybePixel
Source§impl PixelInitializer for MaybePixel
impl PixelInitializer for MaybePixel
fn new( color: impl Into<Option<PixelColor>>, position: impl Into<PixelPosition>, ) -> Self
Source§impl PixelInterface for &MaybePixel
impl PixelInterface for &MaybePixel
Source§impl PixelInterface for &mut MaybePixel
impl PixelInterface for &mut MaybePixel
Source§impl PixelInterface for MaybePixel
impl PixelInterface for MaybePixel
Source§impl<'p, T> PixelIterExt<&'p MaybePixel> for Twhere
T: Iterator<Item = &'p MaybePixel>,
impl<'p, T> PixelIterExt<&'p MaybePixel> for Twhere
T: Iterator<Item = &'p MaybePixel>,
Source§fn filter_color(
self,
color: impl Into<<Self::Item as PixelInterface>::ColorType>,
) -> impl Iterator<Item = Item>
fn filter_color( self, color: impl Into<<Self::Item as PixelInterface>::ColorType>, ) -> impl Iterator<Item = Item>
Filter pixels using their
PixelColor.Source§fn filter_position<P>(self, predicate: P) -> impl Iterator<Item = Item>
fn filter_position<P>(self, predicate: P) -> impl Iterator<Item = Item>
Filter pixels based on their
PixelPosition.Source§impl<'p, T> PixelIterExt<&'p mut MaybePixel> for Twhere
T: Iterator<Item = &'p mut MaybePixel>,
impl<'p, T> PixelIterExt<&'p mut MaybePixel> for Twhere
T: Iterator<Item = &'p mut MaybePixel>,
Source§fn filter_color(
self,
color: impl Into<<Self::Item as PixelInterface>::ColorType>,
) -> impl Iterator<Item = Item>
fn filter_color( self, color: impl Into<<Self::Item as PixelInterface>::ColorType>, ) -> impl Iterator<Item = Item>
Filter pixels using their
PixelColor.Source§fn filter_position<P>(self, predicate: P) -> impl Iterator<Item = Item>
fn filter_position<P>(self, predicate: P) -> impl Iterator<Item = Item>
Filter pixels based on their
PixelPosition.Source§impl<'p, T> PixelIterExt<MaybePixel> for Twhere
T: Iterator<Item = MaybePixel>,
impl<'p, T> PixelIterExt<MaybePixel> for Twhere
T: Iterator<Item = MaybePixel>,
Source§fn filter_color(
self,
color: impl Into<<Self::Item as PixelInterface>::ColorType>,
) -> impl Iterator<Item = Item>
fn filter_color( self, color: impl Into<<Self::Item as PixelInterface>::ColorType>, ) -> impl Iterator<Item = Item>
Filter pixels using their
PixelColor.Source§fn filter_position<P>(self, predicate: P) -> impl Iterator<Item = Item>
fn filter_position<P>(self, predicate: P) -> impl Iterator<Item = Item>
Filter pixels based on their
PixelPosition.Source§impl<'p, T> PixelIterMutExt<'p, &'p mut MaybePixel> for Twhere
T: Iterator<Item = &'p mut MaybePixel>,
impl<'p, T> PixelIterMutExt<'p, &'p mut MaybePixel> for Twhere
T: Iterator<Item = &'p mut MaybePixel>,
Source§fn update_colors(
self,
color: impl Into<<Self::Item as PixelInterface>::ColorType>,
)
fn update_colors( self, color: impl Into<<Self::Item as PixelInterface>::ColorType>, )
Updates the
PixelColor for all of this iterator members.Source§impl PixelMutInterface for &mut MaybePixel
impl PixelMutInterface for &mut MaybePixel
Source§fn update_color(
&mut self,
color: impl Into<Self::ColorType>,
) -> Option<PixelColor>
fn update_color( &mut self, color: impl Into<Self::ColorType>, ) -> Option<PixelColor>
Source§impl PixelMutInterface for MaybePixel
impl PixelMutInterface for MaybePixel
Source§fn update_color(
&mut self,
color: impl Into<Self::ColorType>,
) -> Option<PixelColor>
fn update_color( &mut self, color: impl Into<Self::ColorType>, ) -> Option<PixelColor>
impl Eq for MaybePixel
impl StructuralPartialEq for MaybePixel
Auto Trait Implementations§
impl Freeze for MaybePixel
impl RefUnwindSafe for MaybePixel
impl Send for MaybePixel
impl Sync for MaybePixel
impl Unpin for MaybePixel
impl UnwindSafe for MaybePixel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.