#[repr(C)]pub struct GreyAlpha<ComponentType, AlphaComponentType = ComponentType>(pub ComponentType, pub AlphaComponentType);
Expand description
Grayscale with alpha. Use .0
/.1
to access.
Tuple Fields§
§0: ComponentType
brightness level
1: AlphaComponentType
alpha
Implementations§
source§impl<T, A> GrayAlpha<T, A>where
T: Copy,
A: Clone,
impl<T, A> GrayAlpha<T, A>where T: Copy, A: Clone,
Trait Implementations§
source§impl<T, A> AddAssign<GrayAlpha<T, A>> for GrayAlpha<T, A>where
T: Add<T, Output = T> + Copy,
A: Add<A, Output = A> + Copy,
impl<T, A> AddAssign<GrayAlpha<T, A>> for GrayAlpha<T, A>where T: Add<T, Output = T> + Copy, A: Add<A, Output = A> + Copy,
px + px
source§fn add_assign(&mut self, other: GrayAlpha<T, A>)
fn add_assign(&mut self, other: GrayAlpha<T, A>)
Performs the
+=
operation. Read moresource§impl<T> AddAssign<T> for GrayAlpha<T, T>where
T: Copy + Add<T, Output = T>,
impl<T> AddAssign<T> for GrayAlpha<T, T>where T: Copy + Add<T, Output = T>,
px + 1
source§fn add_assign(&mut self, r: T)
fn add_assign(&mut self, r: T)
Performs the
+=
operation. Read moresource§impl<T> AsPixels<GrayAlpha<T, T>> for [T]
impl<T> AsPixels<GrayAlpha<T, T>> for [T]
source§fn as_pixels(&self) -> &[GrayAlpha<T, T>]
fn as_pixels(&self) -> &[GrayAlpha<T, T>]
Reinterpret the slice as a read-only/shared slice of pixels.
Multiple consecutive elements in the slice are intepreted as a single pixel
(depending on format, e.g. 3 for RGB, 4 for RGBA). Read more
source§fn as_pixels_mut(&mut self) -> &mut [GrayAlpha<T, T>]
fn as_pixels_mut(&mut self) -> &mut [GrayAlpha<T, T>]
Reinterpret the slice as a mutable/exclusive slice of pixels.
Multiple consecutive elements in the slice are intepreted as a single pixel
(depending on format, e.g. 3 for RGB, 4 for RGBA). Read more
source§impl<ComponentType, AlphaComponentType> Clone for GrayAlpha<ComponentType, AlphaComponentType>where
ComponentType: Clone,
AlphaComponentType: Clone,
impl<ComponentType, AlphaComponentType> Clone for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: Clone, AlphaComponentType: Clone,
source§impl<T, A, B> ColorComponentMap<GrayAlpha<B, A>, T, B> for GrayAlpha<T, A>where
T: Copy,
A: Copy,
impl<T, A, B> ColorComponentMap<GrayAlpha<B, A>, T, B> for GrayAlpha<T, A>where T: Copy, A: Copy,
source§impl<T> ComponentSlice<T> for GrayAlpha<T, T>
impl<T> ComponentSlice<T> for GrayAlpha<T, T>
source§impl<ComponentType, AlphaComponentType> Debug for GrayAlpha<ComponentType, AlphaComponentType>where
ComponentType: Debug,
AlphaComponentType: Debug,
impl<ComponentType, AlphaComponentType> Debug for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: Debug, AlphaComponentType: Debug,
source§impl<ComponentType, AlphaComponentType> Default for GrayAlpha<ComponentType, AlphaComponentType>where
ComponentType: Default,
AlphaComponentType: Default,
impl<ComponentType, AlphaComponentType> Default for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: Default, AlphaComponentType: Default,
source§impl<T> DivAssign<T> for GrayAlpha<T, T>where
T: Copy + Div<T, Output = T>,
impl<T> DivAssign<T> for GrayAlpha<T, T>where T: Copy + Div<T, Output = T>,
px * 1
source§fn div_assign(&mut self, r: T)
fn div_assign(&mut self, r: T)
Performs the
/=
operation. Read moresource§impl<ComponentType, AlphaComponentType> Hash for GrayAlpha<ComponentType, AlphaComponentType>where
ComponentType: Hash,
AlphaComponentType: Hash,
impl<ComponentType, AlphaComponentType> Hash for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: Hash, AlphaComponentType: Hash,
source§impl<T> MulAssign<T> for GrayAlpha<T, T>where
T: Copy + Mul<T, Output = T>,
impl<T> MulAssign<T> for GrayAlpha<T, T>where T: Copy + Mul<T, Output = T>,
px * 1
source§fn mul_assign(&mut self, r: T)
fn mul_assign(&mut self, r: T)
Performs the
*=
operation. Read moresource§impl<ComponentType, AlphaComponentType> Ord for GrayAlpha<ComponentType, AlphaComponentType>where
ComponentType: Ord,
AlphaComponentType: Ord,
impl<ComponentType, AlphaComponentType> Ord for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: Ord, AlphaComponentType: Ord,
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<ComponentType, AlphaComponentType> PartialEq<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType>where
ComponentType: PartialEq<ComponentType>,
AlphaComponentType: PartialEq<AlphaComponentType>,
impl<ComponentType, AlphaComponentType> PartialEq<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: PartialEq<ComponentType>, AlphaComponentType: PartialEq<AlphaComponentType>,
source§impl<ComponentType, AlphaComponentType> PartialOrd<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType>where
ComponentType: PartialOrd<ComponentType>,
AlphaComponentType: PartialOrd<AlphaComponentType>,
impl<ComponentType, AlphaComponentType> PartialOrd<GrayAlpha<ComponentType, AlphaComponentType>> for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: PartialOrd<ComponentType>, AlphaComponentType: PartialOrd<AlphaComponentType>,
source§fn partial_cmp(
&self,
other: &GrayAlpha<ComponentType, AlphaComponentType>
) -> Option<Ordering>
fn partial_cmp( &self, other: &GrayAlpha<ComponentType, AlphaComponentType> ) -> Option<Ordering>
1.0.0 · source§fn 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 moresource§impl<T, A> SubAssign<GrayAlpha<T, A>> for GrayAlpha<T, A>where
T: Sub<T, Output = T> + Copy,
A: Sub<A, Output = A> + Copy,
impl<T, A> SubAssign<GrayAlpha<T, A>> for GrayAlpha<T, A>where T: Sub<T, Output = T> + Copy, A: Sub<A, Output = A> + Copy,
px - px
source§fn sub_assign(&mut self, other: GrayAlpha<T, A>)
fn sub_assign(&mut self, other: GrayAlpha<T, A>)
Performs the
-=
operation. Read moresource§impl<T> SubAssign<T> for GrayAlpha<T, T>where
T: Copy + Sub<T, Output = T>,
impl<T> SubAssign<T> for GrayAlpha<T, T>where T: Copy + Sub<T, Output = T>,
px - 1
source§fn sub_assign(&mut self, r: T)
fn sub_assign(&mut self, r: T)
Performs the
-=
operation. Read moresource§impl<T, A> Sum<GrayAlpha<T, A>> for GrayAlpha<T, A>where
T: Default + Add<T, Output = T>,
A: Default + Add<A, Output = A>,
impl<T, A> Sum<GrayAlpha<T, A>> for GrayAlpha<T, A>where T: Default + Add<T, Output = T>, A: Default + Add<A, Output = A>,
impl<ComponentType, AlphaComponentType> Copy for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: Copy, AlphaComponentType: Copy,
impl<ComponentType, AlphaComponentType> Eq for GrayAlpha<ComponentType, AlphaComponentType>where ComponentType: Eq, AlphaComponentType: Eq,
impl<T, A> Pod for GrayAlpha<T, A>where T: Pod, A: Pod,
impl<ComponentType, AlphaComponentType> StructuralEq for GrayAlpha<ComponentType, AlphaComponentType>
impl<ComponentType, AlphaComponentType> StructuralPartialEq for GrayAlpha<ComponentType, AlphaComponentType>
Auto Trait Implementations§
impl<ComponentType, AlphaComponentType> RefUnwindSafe for GrayAlpha<ComponentType, AlphaComponentType>where AlphaComponentType: RefUnwindSafe, ComponentType: RefUnwindSafe,
impl<ComponentType, AlphaComponentType> Send for GrayAlpha<ComponentType, AlphaComponentType>where AlphaComponentType: Send, ComponentType: Send,
impl<ComponentType, AlphaComponentType> Sync for GrayAlpha<ComponentType, AlphaComponentType>where AlphaComponentType: Sync, ComponentType: Sync,
impl<ComponentType, AlphaComponentType> Unpin for GrayAlpha<ComponentType, AlphaComponentType>where AlphaComponentType: Unpin, ComponentType: Unpin,
impl<ComponentType, AlphaComponentType> UnwindSafe for GrayAlpha<ComponentType, AlphaComponentType>where AlphaComponentType: UnwindSafe, ComponentType: 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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more