Struct rgb::alt::Gray[][src]

#[repr(C)]
pub struct Gray<ComponentType>(pub ComponentType);

Grayscale. Use .0 or * (deref) to access the value.

Trait Implementations

impl<T: Clone> From<Gray<T>> for RGB<T>
[src]

Performs the conversion.

impl<T> AsRef<T> for Gray<T>
[src]

Performs the conversion.

impl<T> AsMut<T> for Gray<T>
[src]

Performs the conversion.

impl<ComponentType: Copy> Copy for Gray<ComponentType>
[src]

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

impl<ComponentType: Default> Default for Gray<ComponentType>
[src]

Returns the "default value" for a type. Read more

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

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

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

This method tests for !=.

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

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

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

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

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

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

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

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

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

impl<ComponentType: Hash> Hash for Gray<ComponentType>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T> Deref for Gray<T>
[src]

The resulting type after dereferencing.

Dereferences the value.

impl<T: Copy> From<T> for Gray<T>
[src]

Performs the conversion.

impl<T> ComponentSlice<T> for Gray<T>
[src]

The components interpreted as an array, e.g. one RGB expands to 3 elements. Read more

impl<T: Copy> From<Gray<T>> for GrayAlpha<T, u8>
[src]

Assumes 255 is opaque

Performs the conversion.

impl<T: Copy> From<Gray<T>> for GrayAlpha<T, u16>
[src]

Assumes 65535 is opaque

Performs the conversion.

Auto Trait Implementations

impl<ComponentType> Send for Gray<ComponentType> where
    ComponentType: Send

impl<ComponentType> Sync for Gray<ComponentType> where
    ComponentType: Sync