[][src]Struct rgb::alt::BGR

#[repr(C)]
pub struct BGR<ComponentType> { pub b: ComponentType, pub g: ComponentType, pub r: ComponentType, }

RGB in reverse byte order

Fields

b: ComponentType

Blue first

g: ComponentType

Green

r: ComponentType

Red last

Methods

impl<T: Clone> BGR<T>
[src]

pub fn new(r: T, g: T, b: T) -> Self
[src]

Convenience function for creating a new pixel

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> ComponentSlice<T> for BGR<T>
[src]

impl<T: Copy, B> ComponentMap<BGR<B>, T, B> for BGR<T>
[src]

impl<T> AsPixels<BGR<T>> for [T]
[src]

impl<ComponentType: Copy> Copy for BGR<ComponentType>
[src]

impl<T: Display> Display for BGR<T>
[src]

impl<ComponentType: Debug> Debug for BGR<ComponentType>
[src]

impl<ComponentType: PartialEq> PartialEq<BGR<ComponentType>> for BGR<ComponentType>
[src]

impl<ComponentType: Eq> Eq for BGR<ComponentType>
[src]

impl<ComponentType: Ord> Ord for BGR<ComponentType>
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl<ComponentType: PartialOrd> PartialOrd<BGR<ComponentType>> for BGR<ComponentType>
[src]

impl<ComponentType: Hash> Hash for BGR<ComponentType>
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

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: Copy> From<[T; 3]> for BGR<T>
[src]

impl<T> From<(T, T, T)> for BGR<T>
[src]

impl<T> From<RGB<T>> for BGR<T>
[src]

impl<T> From<BGR<T>> for RGB<T>
[src]

impl<ComponentType: Clone> Clone for BGR<ComponentType>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<ComponentType: Default> Default for BGR<ComponentType>
[src]

impl<T> Into<[T; 3]> for BGR<T>
[src]

impl<T> Into<(T, T, T)> for BGR<T>
[src]

Auto Trait Implementations

impl<ComponentType> Send for BGR<ComponentType> where
    ComponentType: Send

impl<ComponentType> Sync for BGR<ComponentType> where
    ComponentType: Sync

Blanket Implementations

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> From for T
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]