Struct lodepng::RGB []

pub struct RGB<ComponentType> {
    pub r: ComponentType,
    pub g: ComponentType,
    pub b: ComponentType,
}

Fields

r: ComponentType g: ComponentType b: ComponentType

Methods

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

fn new(r: T, g: T, b: T) -> RGB<T>

fn iter(&self) -> Cloned<Iter<T>>

Trait Implementations

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

fn partial_cmp(&self, __arg_0: &RGB<ComponentType>) -> Option<Ordering>

fn lt(&self, __arg_0: &RGB<ComponentType>) -> bool

fn le(&self, __arg_0: &RGB<ComponentType>) -> bool

fn gt(&self, __arg_0: &RGB<ComponentType>) -> bool

fn ge(&self, __arg_0: &RGB<ComponentType>) -> bool

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

fn cmp(&self, __arg_0: &RGB<ComponentType>) -> Ordering

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

fn eq(&self, __arg_0: &RGB<ComponentType>) -> bool

fn ne(&self, __arg_0: &RGB<ComponentType>) -> bool

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

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

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

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

fn clone(&self) -> RGB<ComponentType>

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

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

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

fn map<F>(&self, f: F) -> RGB<B> where F: FnMut(T) -> B

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

fn as_slice(&self) -> &[T]

fn as_mut_slice(&mut self) -> &mut [T]

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

fn from_iter<I>(into_iter: I) -> RGB<T> where I: IntoIterator<Item=T>

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

fn fmt(&self, f: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

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

type Output = RGB<T>

fn add(self, other: RGB<T>) -> RGB<T>::Output

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

type Output = RGB<T>

fn add(self, r: T) -> RGB<T>::Output

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

type Output = RGB<T>

fn mul(self, r: T) -> RGB<T>::Output