Struct color::Rgb[][src]

pub struct Rgb<T> {
    pub r: T,
    pub g: T,
    pub b: T,
}

Fields

Methods

impl<T: Channel> Rgb<T>
[src]

Trait Implementations

impl<T: Clone> Clone for Rgb<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for Rgb<T>
[src]

impl<T: PartialEq> PartialEq for Rgb<T>
[src]

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

This method tests for !=.

impl<T: Eq> Eq for Rgb<T>
[src]

impl<T: Debug> Debug for Rgb<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Channel> Color<T> for Rgb<T>
[src]

Clamps the components of the color to the range (lo,hi).

Clamps the components of the color component-wise between lo and hi.

Inverts the color.

impl<T: FloatChannel> FloatColor<T> for Rgb<T>
[src]

Clamps the components of the color to the range (0,1).

impl<T: Clone + Channel> ToRgb for Rgb<T>
[src]

impl<T: Channel> Mul for Rgb<T>
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<T: Channel + Mul<T, Output = T>> Mul<T> for Rgb<T>
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<T: Channel> Div for Rgb<T>
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<T: Channel + Div<T, Output = T>> Div<T> for Rgb<T>
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<T: Channel + Add<T, Output = T>> Add for Rgb<T>
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<T: Channel + Sub<T, Output = T>> Sub for Rgb<T>
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<T: Channel + Saturating> Saturating for Rgb<T>
[src]

Saturating addition operator. Returns a+b, saturating at the numeric bounds instead of overflowing. Read more

Saturating subtraction operator. Returns a-b, saturating at the numeric bounds instead of overflowing. Read more

impl<T> Index<usize> for Rgb<T>
[src]

The returned type after indexing.

Important traits for &'a mut R

Performs the indexing (container[index]) operation.

impl<T> IndexMut<usize> for Rgb<T>
[src]

Important traits for &'a mut R

Performs the mutable indexing (container[index]) operation.

impl<T> AsRef<[T; 3]> for Rgb<T>
[src]

Performs the conversion.

impl<T> AsMut<[T; 3]> for Rgb<T>
[src]

Performs the conversion.

impl<T: Channel + NumCast> ToHsv for Rgb<T>
[src]

impl<T: Channel> ToRgba for Rgb<T>
[src]

Auto Trait Implementations

impl<T> Send for Rgb<T> where
    T: Send

impl<T> Sync for Rgb<T> where
    T: Sync