Struct lodepng::RGB []

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

Fields

Methods

impl<T> RGB<T> where T: Clone

Convenience function for creating a new pixel

Iterate over color components (R, G, and B)

Trait Implementations

impl<ComponentType> PartialOrd<RGB<ComponentType>> for RGB<ComponentType> where ComponentType: PartialOrd<ComponentType>

impl<T> FromIterator<T> for RGB<T>

Takes exactly 3 elements from the iterator and creates a new instance. Panics if there are fewer elements in the iterator.

impl<ComponentType> PartialEq<RGB<ComponentType>> for RGB<ComponentType> where ComponentType: PartialEq<ComponentType>

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl From<RGB<u8>> for RGB<i16>

Performs the conversion.

impl From<RGB<u16>> for RGB<i32>

Performs the conversion.

impl From<RGB<u8>> for RGB<f32>

Performs the conversion.

impl From<RGB<u8>> for RGB<f64>

Performs the conversion.

impl From<RGB<u16>> for RGB<f32>

Performs the conversion.

impl From<RGB<u16>> for RGB<f64>

Performs the conversion.

impl From<RGB<i16>> for RGB<f32>

Performs the conversion.

impl From<RGB<i16>> for RGB<f64>

Performs the conversion.

impl From<RGB<i32>> for RGB<f64>

Performs the conversion.

impl From<RGB<f32>> for RGB<f64>

Performs the conversion.

impl<T> Display for RGB<T> where T: Display

Formats the value using the given formatter.

impl<ComponentType> Eq for RGB<ComponentType> where ComponentType: Eq

impl<ComponentType> Copy for RGB<ComponentType> where ComponentType: Copy

impl<ComponentType> Ord for RGB<ComponentType> where ComponentType: Ord

impl<T, B> ComponentMap<RGB<B>, T, B> for RGB<T> where T: Copy

impl<ComponentType> Debug for RGB<ComponentType> where ComponentType: Debug

Formats the value using the given formatter.

impl<ComponentType> Hash for RGB<ComponentType> where ComponentType: Hash

impl<T> ComponentBytes<T> for RGB<T>

impl<T> Add<RGB<T>> for RGB<T> where T: Add<T> + Clone,
        RGB<T>: FromIterator<T::Output>

impl<T> Add<T> for RGB<T> where T: Copy + Add<T, Output=T> + Clone + Add<T>

impl<ComponentType> Clone for RGB<ComponentType> where ComponentType: Clone

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Mul<T> for RGB<T> where T: Copy + Mul<T, Output=T> + Clone + Mul<T>

impl<T> Sub<RGB<T>> for RGB<T> where T: Sub<T> + Clone,
        RGB<T>: FromIterator<T::Output>