#[repr(C)]pub struct BGR<ComponentType> {
pub b: ComponentType,
pub g: ComponentType,
pub r: ComponentType,
}
Expand description
RGB in reverse byte order
Fields§
§b: ComponentType
Blue first
g: ComponentType
Green
r: ComponentType
Red last
Implementations§
Trait Implementations§
source§impl<T> AsPixels<BGR<T>> for [T]
impl<T> AsPixels<BGR<T>> for [T]
source§fn as_pixels(&self) -> &[BGR<T>]
fn as_pixels(&self) -> &[BGR<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 [BGR<T>]
fn as_pixels_mut(&mut self) -> &mut [BGR<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<T> ComponentSlice<T> for BGR<T>
impl<T> ComponentSlice<T> for BGR<T>
source§impl<ComponentType: Ord> Ord for BGR<ComponentType>
impl<ComponentType: Ord> Ord for BGR<ComponentType>
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> PartialEq<BGR<ComponentType>> for BGR<ComponentType>
impl<ComponentType: PartialEq> PartialEq<BGR<ComponentType>> for BGR<ComponentType>
source§impl<ComponentType: PartialOrd> PartialOrd<BGR<ComponentType>> for BGR<ComponentType>
impl<ComponentType: PartialOrd> PartialOrd<BGR<ComponentType>> for BGR<ComponentType>
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> Copy for BGR<ComponentType>
impl<ComponentType: Eq> Eq for BGR<ComponentType>
impl<T> Pod for BGR<T>where T: Pod,
impl<ComponentType> StructuralEq for BGR<ComponentType>
impl<ComponentType> StructuralPartialEq for BGR<ComponentType>
Auto Trait Implementations§
impl<ComponentType> RefUnwindSafe for BGR<ComponentType>where ComponentType: RefUnwindSafe,
impl<ComponentType> Send for BGR<ComponentType>where ComponentType: Send,
impl<ComponentType> Sync for BGR<ComponentType>where ComponentType: Sync,
impl<ComponentType> Unpin for BGR<ComponentType>where ComponentType: Unpin,
impl<ComponentType> UnwindSafe for BGR<ComponentType>where 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
.