Struct rgb::alt::BGR [−][src]
RGB in reverse byte order
Fields
b: ComponentType
Blue first
g: ComponentType
Green
r: ComponentType
Red last
Implementations
impl<T> BGR<T>
[src]
pub const fn new(r: T, g: T, b: T) -> Self
[src]
Convenience function for creating a new pixel The order of arguments is R,G,B
impl<T: Clone> BGR<T>
[src]
pub fn iter(&self) -> Cloned<Iter<'_, T>>
[src]
Iterate over color components (R, G, and B)
pub fn alpha(&self, a: T) -> BGRA<T>
[src]
pub fn new_alpha<A>(&self, a: A) -> BGRA<T, A>
[src]
Trait Implementations
impl<T> AsPixels<BGR<T>> for [T]
[src]
impl<ComponentType: Clone> Clone for BGR<ComponentType>
[src]
fn clone(&self) -> BGR<ComponentType>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy, B> ComponentMap<BGR<B>, T, B> for BGR<T>
[src]
impl<T> ComponentSlice<T> for BGR<T>
[src]
fn as_slice(&self) -> &[T]
[src]
fn as_mut_slice(&mut self) -> &mut [T]
[src]
impl<ComponentType: Copy> Copy for BGR<ComponentType>
[src]
impl<ComponentType: Debug> Debug for BGR<ComponentType>
[src]
impl<ComponentType: Default> Default for BGR<ComponentType>
[src]
impl<T: Display> Display for BGR<T>
[src]
impl<ComponentType: Eq> Eq for BGR<ComponentType>
[src]
impl<T: Copy> From<[T; 3]> for BGR<T>
[src]
impl<T> From<(T, T, T)> for BGR<T>
[src]
impl<T> From<BGR<T>> for RGB<T>
[src]
impl<T: Copy> From<BGR<T>> for BGRA<T, u8>
[src]
Assumes 255 is opaque
impl<T: Copy> From<BGR<T>> for RGBA<T, u8>
[src]
Assumes 255 is opaque
impl<T: Copy> From<BGR<T>> for BGRA<T, u16>
[src]
Assumes 65535 is opaque
impl<T: Copy> From<BGR<T>> for RGBA<T, u16>
[src]
Assumes 255 is opaque
impl<T> From<RGB<T>> for BGR<T>
[src]
impl<ComponentType: Hash> Hash for BGR<ComponentType>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Into<[T; 3]> for BGR<T>
[src]
impl<T> Into<(T, T, T)> for BGR<T>
[src]
impl<T: LowerHex> LowerHex for BGR<T>
[src]
impl<ComponentType: Ord> Ord for BGR<ComponentType>
[src]
fn cmp(&self, other: &BGR<ComponentType>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<ComponentType: PartialEq> PartialEq<BGR<ComponentType>> for BGR<ComponentType>
[src]
fn eq(&self, other: &BGR<ComponentType>) -> bool
[src]
fn ne(&self, other: &BGR<ComponentType>) -> bool
[src]
impl<ComponentType: PartialOrd> PartialOrd<BGR<ComponentType>> for BGR<ComponentType>
[src]
fn partial_cmp(&self, other: &BGR<ComponentType>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<ComponentType> StructuralEq for BGR<ComponentType>
[src]
impl<ComponentType> StructuralPartialEq for BGR<ComponentType>
[src]
impl<T: UpperHex> UpperHex for BGR<T>
[src]
Auto Trait Implementations
impl<ComponentType> Send for BGR<ComponentType> where
ComponentType: Send,
ComponentType: Send,
impl<ComponentType> Sync for BGR<ComponentType> where
ComponentType: Sync,
ComponentType: Sync,
impl<ComponentType> Unpin for BGR<ComponentType> where
ComponentType: Unpin,
ComponentType: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,