Struct dcolor::Lum
[−]
[src]
#[repr(C)]pub struct Lum<T> { pub l: T, }
Luminance color type.
Fields
l: T
Methods
impl<T> Lum<T>
[src]
fn new(l: T) -> Lum<T>
fn with_alpha(self, a: T) -> Luma<T>
Trait Implementations
impl<F, T> FromColor<Lum<F>> for Lum<T> where
F: ClampInto<T>,
[src]
F: ClampInto<T>,
fn from_color(color: Lum<F>) -> Lum<T>
impl<F, T> FromColor<Option<Lum<F>>> for Lum<T> where
F: ClampInto<T>,
T: Clamp,
[src]
F: ClampInto<T>,
T: Clamp,
fn from_color(color: Option<Lum<F>>) -> Lum<T>
impl<F, T> FromColor<Luma<F>> for Lum<T> where
F: ClampInto<T>,
[src]
F: ClampInto<T>,
fn from_color(color: Luma<F>) -> Lum<T>
impl<F, T> FromColor<Rgb<F>> for Lum<T> where
Rgb<F>: Luminance,
f64: ClampInto<T>,
[src]
Rgb<F>: Luminance,
f64: ClampInto<T>,
fn from_color(color: Rgb<F>) -> Lum<T>
impl<F, T> FromColor<Option<Rgb<F>>> for Lum<T> where
Rgb<F>: Luminance,
f64: ClampInto<T>,
T: Clamp,
[src]
Rgb<F>: Luminance,
f64: ClampInto<T>,
T: Clamp,
fn from_color(color: Option<Rgb<F>>) -> Lum<T>
impl<F, T> FromColor<Rgba<F>> for Lum<T> where
Rgb<F>: Luminance,
f64: ClampInto<T>,
[src]
Rgb<F>: Luminance,
f64: ClampInto<T>,
fn from_color(color: Rgba<F>) -> Lum<T>
impl<T: Clone> Clone for Lum<T>
[src]
fn clone(&self) -> Lum<T>
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<T: Copy> Copy for Lum<T>
[src]
impl<T: Debug> Debug for Lum<T>
[src]
impl<T: Default> Default for Lum<T>
[src]
impl<T: Eq> Eq for Lum<T>
[src]
impl<T: Hash> Hash for Lum<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: PartialEq> PartialEq for Lum<T>
[src]
fn eq(&self, __arg_0: &Lum<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Lum<T>) -> bool
This method tests for !=
.
impl<T> Clamp for Lum<T> where
T: Clamp,
[src]
T: Clamp,
impl<S, T> Lerp<T> for Lum<S> where
S: Lerp<T>,
[src]
S: Lerp<T>,
impl<T> Mul<T> for Lum<T> where
T: Copy + Mul<Output = T>,
[src]
T: Copy + Mul<Output = T>,
type Output = Lum<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Lum<T>
The method for the *
operator
impl<T> Div<T> for Lum<T> where
T: Copy + Div<Output = T>,
[src]
T: Copy + Div<Output = T>,
type Output = Lum<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Lum<T>
The method for the /
operator
impl<T> Add for Lum<T> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Lum<T>
The resulting type after applying the +
operator
fn add(self, rhs: Lum<T>) -> Lum<T>
The method for the +
operator
impl<T> Sub for Lum<T> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Lum<T>
The resulting type after applying the -
operator
fn sub(self, rhs: Lum<T>) -> Lum<T>
The method for the -
operator
impl<T> Mul for Lum<T> where
T: Mul<Output = T>,
[src]
T: Mul<Output = T>,
type Output = Lum<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Lum<T>) -> Lum<T>
The method for the *
operator
impl<T> Div for Lum<T> where
T: Div<Output = T>,
[src]
T: Div<Output = T>,