Struct rgb::RGB [] [src]

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

Fields

r: ComponentType g: ComponentType b: ComponentType

Methods

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

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

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

Trait Implementations

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

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

This method returns an ordering between self and other values if one exists. Read more

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

This method tests less than (for self and other) and is used by the < operator. Read more

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

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

This method tests greater than (for self and other) and is used by the > operator. Read more

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

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

This method returns an Ordering between self and other. Read more

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

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

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

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

This method tests for !=.

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

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

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

Formats the value using the given formatter.

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

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> Copy for RGB<ComponentType>
[src]

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

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

impl<T> ComponentBytes<T> for RGB<T>
[src]

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

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

fn as_bytes(&self) -> &[u8]

impl<T> FromIterator<T> for RGB<T>
[src]

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

Creates a value from an iterator. Read more

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

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

Formats the value using the given formatter.

impl<T: Clone + Add> Add for RGB<T> where RGB<T>: FromIterator<T::Output>
[src]

type Output = RGB<T>

The resulting type after applying the + operator

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

The method for the + operator

impl<T: Clone + Copy + Add> Add<T> for RGB<T> where T: Add<Output=T>
[src]

type Output = RGB<T>

The resulting type after applying the + operator

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

The method for the + operator

impl<T: Clone + Copy + Mul> Mul<T> for RGB<T> where T: Mul<Output=T>
[src]

type Output = RGB<T>

The resulting type after applying the * operator

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

The method for the * operator