Struct color::Luma[][src]

pub struct Luma<T, S = Srgb> {
    pub l: T,
    pub standard: PhantomData<S>,
}

Fields

l: Tstandard: PhantomData<S>

Implementations

impl<T, S> Luma<T, S>[src]

pub const fn new(l: T) -> Luma<T, S>[src]

impl<T: Channel, S> Luma<T, S>[src]

pub fn from_hex(hex: u8) -> Luma<T>[src]

Trait Implementations

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

type Output = Luma<T, S>

The resulting type after applying the + operator.

impl<T: Clone, S> Clone for Luma<T, S>[src]

impl<T: Channel, S> Color<T> for Luma<T, S>[src]

fn clamp_s(self, lo: T, hi: T) -> Luma<T, S>[src]

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

fn clamp_c(self, lo: Luma<T, S>, hi: Luma<T, S>) -> Luma<T, S>[src]

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

fn inverse(self) -> Luma<T, S>[src]

Inverts the color.

impl<T: Debug, S: Debug> Debug for Luma<T, S>[src]

impl<'de, T, S> Deserialize<'de> for Luma<T, S> where
    T: Deserialize<'de>, 
[src]

impl<T: Channel, S> Div<Luma<T, S>> for Luma<T, S>[src]

type Output = Luma<T, S>

The resulting type after applying the / operator.

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

type Output = Luma<T, S>

The resulting type after applying the / operator.

impl<T: FloatChannel, S> FloatColor<T> for Luma<T, S>[src]

fn saturate(self) -> Luma<T, S>[src]

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

impl<T: Channel, S> Mul<Luma<T, S>> for Luma<T, S>[src]

type Output = Luma<T, S>

The resulting type after applying the * operator.

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

type Output = Luma<T, S>

The resulting type after applying the * operator.

impl<N: PartialEq, S> PartialEq<Luma<N, S>> for Luma<N, S>[src]

impl<T: Channel + Saturating, S> Saturating for Luma<T, S>[src]

impl<T, S> Serialize for Luma<T, S> where
    T: Serialize
[src]

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

type Output = Luma<T, S>

The resulting type after applying the - operator.

impl<T: Channel + NumCast + Num, S: TransferFunction> ToHsv for Luma<T, S>[src]

type Standard = S

impl<T: Channel, S: TransferFunction> ToLuma for Luma<T, S>[src]

type Standard = S

impl<T: Clone + Channel, S: TransferFunction> ToRgb for Luma<T, S>[src]

type Standard = S

impl<T: Clone + Channel, S: TransferFunction> ToRgba for Luma<T, S>[src]

type Standard = S

impl<T: Copy, S> Copy for Luma<T, S>[src]

impl<N: Clone + PartialEq + Eq + Num + NumCast, S> Eq for Luma<N, S>[src]

Auto Trait Implementations

impl<T, S> RefUnwindSafe for Luma<T, S> where
    S: RefUnwindSafe,
    T: RefUnwindSafe

impl<T, S> Send for Luma<T, S> where
    S: Send,
    T: Send

impl<T, S> Sync for Luma<T, S> where
    S: Sync,
    T: Sync

impl<T, S> Unpin for Luma<T, S> where
    S: Unpin,
    T: Unpin

impl<T, S> UnwindSafe for Luma<T, S> where
    S: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]