Struct color::Rgb

source · []
pub struct Rgb<T = u8, S = Srgb> {
    pub r: T,
    pub g: T,
    pub b: T,
    /* private fields */
}

Fields

r: Tg: Tb: T

Implementations

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Converts this type into a mutable reference of the (usually inferred) input type.

Converts this type into a shared reference of the (usually inferred) input type.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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.

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

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

Converts to this type from the input type.

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

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

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

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

This method tests for !=.

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

Serialize this value into the given Serde serializer. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.