#[repr(C)]pub struct BGRA<ComponentType, AlphaComponentType = ComponentType> {
pub b: ComponentType,
pub g: ComponentType,
pub r: ComponentType,
pub a: AlphaComponentType,
}
Expand description
BGR+A
Fields§
§b: ComponentType
Blue first
g: ComponentType
Green
r: ComponentType
Red
a: AlphaComponentType
Alpha last
Implementations§
source§impl<T, A> BGRA<T, A>
impl<T, A> BGRA<T, A>
source§impl<T: Copy, A: Clone> BGRA<T, A>
impl<T: Copy, A: Clone> BGRA<T, A>
Trait Implementations§
source§impl<T> AsPixels<BGRA<T, T>> for [T]
impl<T> AsPixels<BGRA<T, T>> for [T]
source§fn as_pixels(&self) -> &[BGRA<T>]
fn as_pixels(&self) -> &[BGRA<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 [BGRA<T>]
fn as_pixels_mut(&mut self) -> &mut [BGRA<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: Clone, AlphaComponentType: Clone> Clone for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: Clone, AlphaComponentType: Clone> Clone for BGRA<ComponentType, AlphaComponentType>
source§impl<T> ComponentSlice<T> for BGRA<T>
impl<T> ComponentSlice<T> for BGRA<T>
source§impl<ComponentType: Debug, AlphaComponentType: Debug> Debug for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: Debug, AlphaComponentType: Debug> Debug for BGRA<ComponentType, AlphaComponentType>
source§impl<ComponentType: Default, AlphaComponentType: Default> Default for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: Default, AlphaComponentType: Default> Default for BGRA<ComponentType, AlphaComponentType>
source§impl<T, A> From<(T, T, T, A)> for BGRA<T, A>
impl<T, A> From<(T, T, T, A)> for BGRA<T, A>
source§fn from(other: (T, T, T, A)) -> Self
fn from(other: (T, T, T, A)) -> Self
Converts to this type from the input type.
source§impl<ComponentType: Hash, AlphaComponentType: Hash> Hash for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: Hash, AlphaComponentType: Hash> Hash for BGRA<ComponentType, AlphaComponentType>
source§impl<T, A> Into<(T, T, T, A)> for BGRA<T, A>
impl<T, A> Into<(T, T, T, A)> for BGRA<T, A>
source§fn into(self) -> (T, T, T, A)
fn into(self) -> (T, T, T, A)
Converts this type into the (usually inferred) input type.
source§impl<ComponentType: Ord, AlphaComponentType: Ord> Ord for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: Ord, AlphaComponentType: Ord> Ord for BGRA<ComponentType, AlphaComponentType>
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: PartialEq, AlphaComponentType: PartialEq> PartialEq<BGRA<ComponentType, AlphaComponentType>> for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: PartialEq, AlphaComponentType: PartialEq> PartialEq<BGRA<ComponentType, AlphaComponentType>> for BGRA<ComponentType, AlphaComponentType>
source§impl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd<BGRA<ComponentType, AlphaComponentType>> for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: PartialOrd, AlphaComponentType: PartialOrd> PartialOrd<BGRA<ComponentType, AlphaComponentType>> for BGRA<ComponentType, AlphaComponentType>
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 moreimpl<ComponentType: Copy, AlphaComponentType: Copy> Copy for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType: Eq, AlphaComponentType: Eq> Eq for BGRA<ComponentType, AlphaComponentType>
impl<T, A> Pod for BGRA<T, A>where T: Pod, A: Pod,
impl<ComponentType, AlphaComponentType> StructuralEq for BGRA<ComponentType, AlphaComponentType>
impl<ComponentType, AlphaComponentType> StructuralPartialEq for BGRA<ComponentType, AlphaComponentType>
Auto Trait Implementations§
impl<ComponentType, AlphaComponentType> RefUnwindSafe for BGRA<ComponentType, AlphaComponentType>where AlphaComponentType: RefUnwindSafe, ComponentType: RefUnwindSafe,
impl<ComponentType, AlphaComponentType> Send for BGRA<ComponentType, AlphaComponentType>where AlphaComponentType: Send, ComponentType: Send,
impl<ComponentType, AlphaComponentType> Sync for BGRA<ComponentType, AlphaComponentType>where AlphaComponentType: Sync, ComponentType: Sync,
impl<ComponentType, AlphaComponentType> Unpin for BGRA<ComponentType, AlphaComponentType>where AlphaComponentType: Unpin, ComponentType: Unpin,
impl<ComponentType, AlphaComponentType> UnwindSafe for BGRA<ComponentType, AlphaComponentType>where AlphaComponentType: UnwindSafe, ComponentType: UnwindSafe,
Blanket Implementations§
source§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
.source§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
.