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: Copy> RGB<T>
[src]

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

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

impl<T> RGB<T>
[src]

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

Trait Implementations

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: Display> Display for RGB<T>
[src]

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

Formats the value using the given formatter.