#[repr(C)]pub struct ARGB<ComponentType, AlphaComponentType = ComponentType> {
pub a: AlphaComponentType,
pub r: ComponentType,
pub g: ComponentType,
pub b: ComponentType,
}
Expand description
A+RGB
Fields
a: AlphaComponentType
Alpha first
r: ComponentType
Red
g: ComponentType
Green
b: ComponentType
Blue last
Implementations
sourceimpl<T: Copy, A: Clone> ARGB<T, A>
impl<T: Copy, A: Clone> ARGB<T, A>
Trait Implementations
sourceimpl<T, A> AddAssign<ARGB<T, A>> for ARGB<T, A> where
T: Add<Output = T> + Copy,
A: Add<Output = A> + Copy,
impl<T, A> AddAssign<ARGB<T, A>> for ARGB<T, A> where
T: Add<Output = T> + Copy,
A: Add<Output = A> + Copy,
px + px
sourcefn add_assign(&mut self, other: ARGB<T, A>)
fn add_assign(&mut self, other: ARGB<T, A>)
Performs the +=
operation. Read more
sourceimpl<T> AddAssign<T> for ARGB<T> where
T: Copy + Add<Output = T>,
impl<T> AddAssign<T> for ARGB<T> where
T: Copy + Add<Output = T>,
px + 1
sourcefn add_assign(&mut self, r: T)
fn add_assign(&mut self, r: T)
Performs the +=
operation. Read more
sourceimpl<T> AsPixels<ARGB<T, T>> for [T]
impl<T> AsPixels<ARGB<T, T>> for [T]
sourcefn as_pixels(&self) -> &[ARGB<T>]
fn as_pixels(&self) -> &[ARGB<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
sourcefn as_pixels_mut(&mut self) -> &mut [ARGB<T>]
fn as_pixels_mut(&mut self) -> &mut [ARGB<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
sourceimpl<ComponentType: Clone, AlphaComponentType: Clone> Clone for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: Clone, AlphaComponentType: Clone> Clone for ARGB<ComponentType, AlphaComponentType>
sourceimpl<T: Copy, B> ComponentMap<ARGB<B, B>, T, B> for ARGB<T>
impl<T: Copy, B> ComponentMap<ARGB<B, B>, T, B> for ARGB<T>
sourceimpl<T> ComponentSlice<T> for ARGB<T>
impl<T> ComponentSlice<T> for ARGB<T>
sourceimpl<ComponentType: Debug, AlphaComponentType: Debug> Debug for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: Debug, AlphaComponentType: Debug> Debug for ARGB<ComponentType, AlphaComponentType>
sourceimpl<ComponentType: Default, AlphaComponentType: Default> Default for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: Default, AlphaComponentType: Default> Default for ARGB<ComponentType, AlphaComponentType>
sourceimpl<'de, ComponentType, AlphaComponentType> Deserialize<'de> for ARGB<ComponentType, AlphaComponentType> where
ComponentType: Deserialize<'de>,
AlphaComponentType: Deserialize<'de>,
impl<'de, ComponentType, AlphaComponentType> Deserialize<'de> for ARGB<ComponentType, AlphaComponentType> where
ComponentType: Deserialize<'de>,
AlphaComponentType: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T> DivAssign<T> for ARGB<T> where
T: Copy + Div<Output = T>,
impl<T> DivAssign<T> for ARGB<T> where
T: Copy + Div<Output = T>,
px * 1
sourcefn div_assign(&mut self, r: T)
fn div_assign(&mut self, r: T)
Performs the /=
operation. Read more
sourceimpl<ComponentType: Hash, AlphaComponentType: Hash> Hash for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: Hash, AlphaComponentType: Hash> Hash for ARGB<ComponentType, AlphaComponentType>
sourceimpl<T> MulAssign<T> for ARGB<T> where
T: Copy + Mul<Output = T>,
impl<T> MulAssign<T> for ARGB<T> where
T: Copy + Mul<Output = T>,
px * 1
sourcefn mul_assign(&mut self, r: T)
fn mul_assign(&mut self, r: T)
Performs the *=
operation. Read more
sourceimpl<ComponentType: Ord, AlphaComponentType: Ord> Ord for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: Ord, AlphaComponentType: Ord> Ord for ARGB<ComponentType, AlphaComponentType>
sourceimpl<ComponentType: PartialEq, AlphaComponentType: PartialEq> PartialEq<ARGB<ComponentType, AlphaComponentType>> for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: PartialEq, AlphaComponentType: PartialEq> PartialEq<ARGB<ComponentType, AlphaComponentType>> for ARGB<ComponentType, AlphaComponentType>
sourceimpl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd<ARGB<ComponentType, AlphaComponentType>> for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd<ARGB<ComponentType, AlphaComponentType>> for ARGB<ComponentType, AlphaComponentType>
sourcefn partial_cmp(
&self,
other: &ARGB<ComponentType, AlphaComponentType>
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &ARGB<ComponentType, AlphaComponentType>
) -> 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
sourceimpl<ComponentType, AlphaComponentType> Serialize for ARGB<ComponentType, AlphaComponentType> where
ComponentType: Serialize,
AlphaComponentType: Serialize,
impl<ComponentType, AlphaComponentType> Serialize for ARGB<ComponentType, AlphaComponentType> where
ComponentType: Serialize,
AlphaComponentType: Serialize,
sourceimpl<T, A> SubAssign<ARGB<T, A>> for ARGB<T, A> where
T: Sub<Output = T> + Copy,
A: Sub<Output = A> + Copy,
impl<T, A> SubAssign<ARGB<T, A>> for ARGB<T, A> where
T: Sub<Output = T> + Copy,
A: Sub<Output = A> + Copy,
px - px
sourcefn sub_assign(&mut self, other: ARGB<T, A>)
fn sub_assign(&mut self, other: ARGB<T, A>)
Performs the -=
operation. Read more
sourceimpl<T> SubAssign<T> for ARGB<T> where
T: Copy + Sub<Output = T>,
impl<T> SubAssign<T> for ARGB<T> where
T: Copy + Sub<Output = T>,
px - 1
sourcefn sub_assign(&mut self, r: T)
fn sub_assign(&mut self, r: T)
Performs the -=
operation. Read more
sourceimpl<T, A> Sum<ARGB<T, A>> for ARGB<T, A> where
T: Default + Add<Output = T>,
A: Default + Add<Output = A>,
impl<T, A> Sum<ARGB<T, A>> for ARGB<T, A> where
T: Default + Add<Output = T>,
A: Default + Add<Output = A>,
impl<ComponentType: Copy, AlphaComponentType: Copy> Copy for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType: Eq, AlphaComponentType: Eq> Eq for ARGB<ComponentType, AlphaComponentType>
impl<T, A> Pod for ARGB<T, A> where
T: Pod,
A: Pod,
impl<ComponentType, AlphaComponentType> StructuralEq for ARGB<ComponentType, AlphaComponentType>
impl<ComponentType, AlphaComponentType> StructuralPartialEq for ARGB<ComponentType, AlphaComponentType>
Auto Trait Implementations
impl<ComponentType, AlphaComponentType> RefUnwindSafe for ARGB<ComponentType, AlphaComponentType> where
AlphaComponentType: RefUnwindSafe,
ComponentType: RefUnwindSafe,
impl<ComponentType, AlphaComponentType> Send for ARGB<ComponentType, AlphaComponentType> where
AlphaComponentType: Send,
ComponentType: Send,
impl<ComponentType, AlphaComponentType> Sync for ARGB<ComponentType, AlphaComponentType> where
AlphaComponentType: Sync,
ComponentType: Sync,
impl<ComponentType, AlphaComponentType> Unpin for ARGB<ComponentType, AlphaComponentType> where
AlphaComponentType: Unpin,
ComponentType: Unpin,
impl<ComponentType, AlphaComponentType> UnwindSafe for ARGB<ComponentType, AlphaComponentType> where
AlphaComponentType: UnwindSafe,
ComponentType: UnwindSafe,
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