#[repr(C)]pub struct Lms<M, T> {
pub long: T,
pub medium: T,
pub short: T,
pub meta: PhantomData<M>,
}Expand description
Generic LMS.
LMS represents the response of the eye’s cone cells. L, M and S are for
“long”, “medium” and “short” wavelengths, roughly corresponding to red,
green and blue. Many newer mentions of an LMS representation use the letters
R, G and B instead (or sometimes ρ, γ, β), but this library sticks to LMS to
differentiate it from Rgb.
The LMS color space is a model of the physiological response to color
stimuli. It has some mathematical shortcomings that Xyz improves on,
such as severe spectral sensitivity overlap between L, M and S. Despite
this, LMS has a lot of uses, include chromatic adaptation and emulating
different types of color vision deficiency, and it’s sometimes part of the
conversion process between other color spaces.
§Creating a Value
An LMS value is often derived from another color space, through a conversion
matrix. Two such matrices are VonKries and
Bradford, and Palette offers type aliases in the
lms module to make using them a bit more convenient. It’s of
course also possible to simply use Lms::new, but it may not be as
intuitive.
use palette::{
lms::{Lms, VonKriesLms, matrix::VonKries},
white_point::D65,
Srgb, FromColor
};
let von_kries_lms = Lms::<VonKries, f32>::new(0.1, 0.2, 0.3);
let von_kries_d65_lms = VonKriesLms::<D65, f32>::new(0.1, 0.2, 0.3);
// `new` is also `const`:
const VON_KRIES_LMS: Lms<VonKries, f32> = Lms::new(0.1, 0.2, 0.3);
// Von Kries LMS from sRGB:
let lms_from_srgb = VonKriesLms::<D65, f32>::from_color(Srgb::new(0.3f32, 0.8, 0.1));
// It's also possible to convert from (and to) arrays and tuples:
let lms_from_array = VonKriesLms::<D65, f32>::from([0.1, 0.2, 0.3]);
let lms_from_tuple = VonKriesLms::<D65, f32>::from((0.1, 0.2, 0.3));Fields§
§long: TStimulus from long wavelengths, or red, or ρ. The typical range is between 0.0 and 1.0, but it doesn’t have an actual upper bound.
medium: TStimulus from medium wavelengths, or green, or γ. The typical range is between 0.0 and 1.0, but it doesn’t have an actual upper bound.
short: TStimulus from short wavelengths, or blue, or β. The typical range is between 0.0 and 1.0, but it doesn’t have an actual upper bound.
meta: PhantomData<M>Type level meta information, such as reference white, or which matrix was used when converting from XYZ.
Implementations§
Source§impl<M, T> Lms<M, T>
impl<M, T> Lms<M, T>
Sourcepub fn into_format<U>(self) -> Lms<M, U>where
U: FromStimulus<T>,
pub fn into_format<U>(self) -> Lms<M, U>where
U: FromStimulus<T>,
Convert the LMS components into another number type.
use palette::{
lms::VonKriesLms,
white_point::D65,
};
let lms_f64: VonKriesLms<D65, f64> = VonKriesLms::new(0.3f32, 0.7, 0.2).into_format();Sourcepub fn from_format<U>(color: Lms<M, U>) -> Lms<M, T>where
T: FromStimulus<U>,
pub fn from_format<U>(color: Lms<M, U>) -> Lms<M, T>where
T: FromStimulus<U>,
Convert the LMS components from another number type.
use palette::{
lms::VonKriesLms,
white_point::D65,
};
let lms_f64 = VonKriesLms::<D65, f64>::from_format(VonKriesLms::new(0.3f32, 0.7, 0.2));Sourcepub fn into_components(self) -> (T, T, T)
pub fn into_components(self) -> (T, T, T)
Convert to a (long, medium, short) tuple.
Sourcepub fn from_components(_: (T, T, T)) -> Lms<M, T>
pub fn from_components(_: (T, T, T)) -> Lms<M, T>
Convert from a (long, medium, short) tuple.
Sourcepub fn with_meta<NewM>(self) -> Lms<NewM, T>
pub fn with_meta<NewM>(self) -> Lms<NewM, T>
Changes the meta type without changing the color value.
This function doesn’t change the numerical values, and thus the stimuli it represents in an absolute sense. However, the appearance of the color may not be the same. The effect may be similar to taking a photo with an incorrect white balance.
Source§impl<M, T> Lms<M, T>
impl<M, T> Lms<M, T>
Sourcepub fn matrix_from_xyz() -> Matrix3<Xyz<<M as HasXyzMeta>::XyzMeta, T>, Lms<M, T>>
pub fn matrix_from_xyz() -> Matrix3<Xyz<<M as HasXyzMeta>::XyzMeta, T>, Lms<M, T>>
Source§impl<M, C> Lms<M, C>
impl<M, C> Lms<M, C>
Sourcepub fn iter<'a>(&'a self) -> <&'a Lms<M, C> as IntoIterator>::IntoIterwhere
&'a Lms<M, C>: IntoIterator,
pub fn iter<'a>(&'a self) -> <&'a Lms<M, C> as IntoIterator>::IntoIterwhere
&'a Lms<M, C>: IntoIterator,
Return an iterator over the colors in the wrapped collections.
Sourcepub fn iter_mut<'a>(
&'a mut self,
) -> <&'a mut Lms<M, C> as IntoIterator>::IntoIterwhere
&'a mut Lms<M, C>: IntoIterator,
pub fn iter_mut<'a>(
&'a mut self,
) -> <&'a mut Lms<M, C> as IntoIterator>::IntoIterwhere
&'a mut Lms<M, C>: IntoIterator,
Return an iterator that allows modifying the colors in the wrapped collections.
Sourcepub fn get<'a, I, T>(
&'a self,
index: I,
) -> Option<Lms<M, &'a <I as SliceIndex<[T]>>::Output>>
pub fn get<'a, I, T>( &'a self, index: I, ) -> Option<Lms<M, &'a <I as SliceIndex<[T]>>::Output>>
Get a color, or slice of colors, with references to the components at index. See slice::get for details.
Sourcepub fn get_mut<'a, I, T>(
&'a mut self,
index: I,
) -> Option<Lms<M, &'a mut <I as SliceIndex<[T]>>::Output>>
pub fn get_mut<'a, I, T>( &'a mut self, index: I, ) -> Option<Lms<M, &'a mut <I as SliceIndex<[T]>>::Output>>
Get a color, or slice of colors, that allows modifying the components at index. See slice::get_mut for details.
Source§impl<M, T> Lms<M, Vec<T>>
impl<M, T> Lms<M, Vec<T>>
Sourcepub fn with_capacity(capacity: usize) -> Lms<M, Vec<T>>
Available on crate feature alloc only.
pub fn with_capacity(capacity: usize) -> Lms<M, Vec<T>>
alloc only.Create a struct of vectors with a minimum capacity. See Vec::with_capacity for details.
Sourcepub fn push(&mut self, value: Lms<M, T>)
Available on crate feature alloc only.
pub fn push(&mut self, value: Lms<M, T>)
alloc only.Push an additional color’s components onto the component vectors. See Vec::push for details.
Sourcepub fn pop(&mut self) -> Option<Lms<M, T>>
Available on crate feature alloc only.
pub fn pop(&mut self) -> Option<Lms<M, T>>
alloc only.Pop a color’s components from the component vectors. See Vec::pop for details.
Sourcepub fn clear(&mut self)
Available on crate feature alloc only.
pub fn clear(&mut self)
alloc only.Clear the component vectors. See Vec::clear for details.
Trait Implementations§
Source§impl<M, T> AbsDiffEq for Lms<M, T>where
T: AbsDiffEq,
<T as AbsDiffEq>::Epsilon: Clone,
Available on crate feature approx only.
impl<M, T> AbsDiffEq for Lms<M, T>where
T: AbsDiffEq,
<T as AbsDiffEq>::Epsilon: Clone,
approx only.Source§fn default_epsilon() -> <Lms<M, T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <Lms<M, T> as AbsDiffEq>::Epsilon
Source§fn abs_diff_eq(
&self,
other: &Lms<M, T>,
epsilon: <T as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_eq( &self, other: &Lms<M, T>, epsilon: <T as AbsDiffEq>::Epsilon, ) -> bool
Source§fn abs_diff_ne(
&self,
other: &Lms<M, T>,
epsilon: <T as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_ne( &self, other: &Lms<M, T>, epsilon: <T as AbsDiffEq>::Epsilon, ) -> bool
AbsDiffEq::abs_diff_eq].Source§impl<M, T> AddAssign<T> for Lms<M, T>
impl<M, T> AddAssign<T> for Lms<M, T>
Source§fn add_assign(&mut self, c: T)
fn add_assign(&mut self, c: T)
+= operation. Read moreSource§impl<M, T> AddAssign for Lms<M, T>where
T: AddAssign,
impl<M, T> AddAssign for Lms<M, T>where
T: AddAssign,
Source§fn add_assign(&mut self, other: Lms<M, T>)
fn add_assign(&mut self, other: Lms<M, T>)
+= operation. Read moreSource§impl<M, T> ClampAssign for Lms<M, T>where
T: ClampAssign + Stimulus,
impl<M, T> ClampAssign for Lms<M, T>where
T: ClampAssign + Stimulus,
Source§fn clamp_assign(&mut self)
fn clamp_assign(&mut self)
Source§impl<'de, M, T> Deserialize<'de> for Lms<M, T>where
T: Deserialize<'de>,
impl<'de, M, T> Deserialize<'de> for Lms<M, T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Lms<M, T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Lms<M, T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<M, T> DivAssign<T> for Lms<M, T>
impl<M, T> DivAssign<T> for Lms<M, T>
Source§fn div_assign(&mut self, c: T)
fn div_assign(&mut self, c: T)
/= operation. Read moreSource§impl<M, T> DivAssign for Lms<M, T>where
T: DivAssign,
impl<M, T> DivAssign for Lms<M, T>where
T: DivAssign,
Source§fn div_assign(&mut self, other: Lms<M, T>)
fn div_assign(&mut self, other: Lms<M, T>)
/= operation. Read moreSource§impl<M, T> EuclideanDistance for Lms<M, T>
impl<M, T> EuclideanDistance for Lms<M, T>
Source§fn distance_squared(
self,
other: Lms<M, T>,
) -> <Lms<M, T> as EuclideanDistance>::Scalar
fn distance_squared( self, other: Lms<M, T>, ) -> <Lms<M, T> as EuclideanDistance>::Scalar
Source§impl<M, T, C> Extend<Lms<M, T>> for Lms<M, C>where
C: Extend<T>,
impl<M, T, C> Extend<Lms<M, T>> for Lms<M, C>where
C: Extend<T>,
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Lms<M, T>>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = Lms<M, T>>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<M, T, _C, _A> FromColorUnclamped<Alpha<_C, _A>> for Lms<M, T>where
_C: IntoColorUnclamped<Lms<M, T>>,
impl<M, T, _C, _A> FromColorUnclamped<Alpha<_C, _A>> for Lms<M, T>where
_C: IntoColorUnclamped<Lms<M, T>>,
Source§impl<M, T, _S, _Wp> FromColorUnclamped<Hsl<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Hsl<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
impl<M, T, _S, _Wp> FromColorUnclamped<Hsl<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Hsl<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
Source§impl<M, T, _Wp> FromColorUnclamped<Hsluv<_Wp, T>> for Lms<M, T>
impl<M, T, _Wp> FromColorUnclamped<Hsluv<_Wp, T>> for Lms<M, T>
Source§impl<M, T, _S, _Wp> FromColorUnclamped<Hsv<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Hsv<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
impl<M, T, _S, _Wp> FromColorUnclamped<Hsv<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Hsv<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
Source§impl<M, T, _S, _Wp> FromColorUnclamped<Hwb<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Hwb<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
impl<M, T, _S, _Wp> FromColorUnclamped<Hwb<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Hwb<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
Source§impl<M, T, _Wp> FromColorUnclamped<Lab<_Wp, T>> for Lms<M, T>
impl<M, T, _Wp> FromColorUnclamped<Lab<_Wp, T>> for Lms<M, T>
Source§impl<M, T, _Wp> FromColorUnclamped<Lch<_Wp, T>> for Lms<M, T>
impl<M, T, _Wp> FromColorUnclamped<Lch<_Wp, T>> for Lms<M, T>
Source§impl<M, T, _Wp> FromColorUnclamped<Lchuv<_Wp, T>> for Lms<M, T>
impl<M, T, _Wp> FromColorUnclamped<Lchuv<_Wp, T>> for Lms<M, T>
Source§impl<M, T> FromColorUnclamped<Lms<M, T>> for Lms<M, T>
impl<M, T> FromColorUnclamped<Lms<M, T>> for Lms<M, T>
Source§impl<M, T> FromColorUnclamped<Lms<M, T>> for Xyz<<M as HasXyzMeta>::XyzMeta, T>
impl<M, T> FromColorUnclamped<Lms<M, T>> for Xyz<<M as HasXyzMeta>::XyzMeta, T>
Source§fn from_color_unclamped(val: Lms<M, T>) -> Xyz<<M as HasXyzMeta>::XyzMeta, T>
fn from_color_unclamped(val: Lms<M, T>) -> Xyz<<M as HasXyzMeta>::XyzMeta, T>
Source§impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hsl<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Rgb<S, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hsl<S, T>>,
impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hsl<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Rgb<S, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hsl<S, T>>,
Source§impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hsluv<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Lchuv<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hsluv<Wp, T>>,
impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hsluv<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Lchuv<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hsluv<Wp, T>>,
Source§impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hsv<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Rgb<S, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hsv<S, T>>,
impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hsv<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Rgb<S, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hsv<S, T>>,
Source§impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hwb<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Hsv<S, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hwb<S, T>>,
impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Hwb<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Hsv<S, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Hwb<S, T>>,
Source§impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Lab<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Xyz<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Lab<Wp, T>>,
impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Lab<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Xyz<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Lab<Wp, T>>,
Source§impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Lch<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Lab<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Lch<Wp, T>>,
impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Lch<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Lab<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Lch<Wp, T>>,
Source§impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Lchuv<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Luv<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Lchuv<Wp, T>>,
impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Lchuv<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Luv<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Lchuv<Wp, T>>,
Source§impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Luma<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <S as LumaStandard>::WhitePoint>,
S: LumaStandard,
Xyz<<S as LumaStandard>::WhitePoint, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Luma<S, T>>,
impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Luma<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <S as LumaStandard>::WhitePoint>,
S: LumaStandard,
Xyz<<S as LumaStandard>::WhitePoint, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Luma<S, T>>,
Source§impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Luv<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Xyz<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Luv<Wp, T>>,
impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Luv<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Xyz<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Luv<Wp, T>>,
Source§impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Okhsl<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Oklab<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Okhsl<T>>,
impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Okhsl<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Oklab<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Okhsl<T>>,
Source§impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Okhsv<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Oklab<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Okhsv<T>>,
impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Okhsv<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Oklab<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Okhsv<T>>,
Source§impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Okhwb<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Okhsv<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Okhwb<T>>,
impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Okhwb<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Okhsv<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Okhwb<T>>,
Source§impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Oklab<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Xyz<D65, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Oklab<T>>,
impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Oklab<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Xyz<D65, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Oklab<T>>,
Source§impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Oklch<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Oklab<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Oklch<T>>,
impl<T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Oklch<T>where
_LmsM: HasXyzMeta<XyzMeta = D65>,
D65: WhitePoint<T>,
Oklab<T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Oklch<T>>,
Source§impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Rgb<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Rgb<S, T>>,
impl<S, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Rgb<S, T>where
_LmsM: HasXyzMeta<XyzMeta = <<S as RgbStandard>::Space as RgbSpace>::WhitePoint>,
S: RgbStandard,
Xyz<<<S as RgbStandard>::Space as RgbSpace>::WhitePoint, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Rgb<S, T>>,
Source§impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Yxy<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Xyz<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Yxy<Wp, T>>,
impl<Wp, T, _LmsM> FromColorUnclamped<Lms<_LmsM, T>> for Yxy<Wp, T>where
_LmsM: HasXyzMeta<XyzMeta = Wp>,
Wp: WhitePoint<T>,
Xyz<Wp, T>: FromColorUnclamped<Lms<_LmsM, T>> + IntoColorUnclamped<Yxy<Wp, T>>,
Source§impl<M, T, _S, _Wp> FromColorUnclamped<Luma<_S, T>> for Lms<M, T>where
_S: LumaStandard<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Luma<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
impl<M, T, _S, _Wp> FromColorUnclamped<Luma<_S, T>> for Lms<M, T>where
_S: LumaStandard<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Luma<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
Source§impl<M, T, _Wp> FromColorUnclamped<Luv<_Wp, T>> for Lms<M, T>
impl<M, T, _Wp> FromColorUnclamped<Luv<_Wp, T>> for Lms<M, T>
Source§impl<M, T> FromColorUnclamped<Okhsl<T>> for Lms<M, T>
impl<M, T> FromColorUnclamped<Okhsl<T>> for Lms<M, T>
Source§impl<M, T> FromColorUnclamped<Okhsv<T>> for Lms<M, T>
impl<M, T> FromColorUnclamped<Okhsv<T>> for Lms<M, T>
Source§impl<M, T> FromColorUnclamped<Okhwb<T>> for Lms<M, T>
impl<M, T> FromColorUnclamped<Okhwb<T>> for Lms<M, T>
Source§impl<M, T> FromColorUnclamped<Oklab<T>> for Lms<M, T>
impl<M, T> FromColorUnclamped<Oklab<T>> for Lms<M, T>
Source§impl<M, T> FromColorUnclamped<Oklch<T>> for Lms<M, T>
impl<M, T> FromColorUnclamped<Oklch<T>> for Lms<M, T>
Source§impl<M, T, _S, _Wp> FromColorUnclamped<Rgb<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Rgb<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
impl<M, T, _S, _Wp> FromColorUnclamped<Rgb<_S, T>> for Lms<M, T>where
_S: RgbStandard,
<_S as RgbStandard>::Space: RgbSpace<WhitePoint = _Wp>,
Xyz<_Wp, T>: FromColorUnclamped<Rgb<_S, T>> + IntoColorUnclamped<Lms<M, T>>,
Source§impl<M, T> FromColorUnclamped<Xyz<<M as HasXyzMeta>::XyzMeta, T>> for Lms<M, T>
impl<M, T> FromColorUnclamped<Xyz<<M as HasXyzMeta>::XyzMeta, T>> for Lms<M, T>
Source§fn from_color_unclamped(val: Xyz<<M as HasXyzMeta>::XyzMeta, T>) -> Lms<M, T>
fn from_color_unclamped(val: Xyz<<M as HasXyzMeta>::XyzMeta, T>) -> Lms<M, T>
Source§impl<M, T, _Wp> FromColorUnclamped<Yxy<_Wp, T>> for Lms<M, T>
impl<M, T, _Wp> FromColorUnclamped<Yxy<_Wp, T>> for Lms<M, T>
Source§impl<M, T, C> FromIterator<Lms<M, T>> for Lms<M, C>
impl<M, T, C> FromIterator<Lms<M, T>> for Lms<M, C>
Source§impl<M, T> HasBoolMask for Lms<M, T>where
T: HasBoolMask,
impl<M, T> HasBoolMask for Lms<M, T>where
T: HasBoolMask,
Source§type Mask = <T as HasBoolMask>::Mask
type Mask = <T as HasBoolMask>::Mask
Self values.Source§impl<'a, 'b, M, T> IntoIterator for &'a Lms<M, &'b [T]>
impl<'a, 'b, M, T> IntoIterator for &'a Lms<M, &'b [T]>
Source§impl<'a, 'b, M, T> IntoIterator for &'a Lms<M, &'b mut [T]>
impl<'a, 'b, M, T> IntoIterator for &'a Lms<M, &'b mut [T]>
Source§impl<'a, M, T> IntoIterator for &'a Lms<M, Vec<T>>
Available on crate feature alloc only.
impl<'a, M, T> IntoIterator for &'a Lms<M, Vec<T>>
alloc only.Source§impl<'a, 'b, M, T> IntoIterator for &'a mut Lms<M, &'b mut [T]>
impl<'a, 'b, M, T> IntoIterator for &'a mut Lms<M, &'b mut [T]>
Source§impl<'a, M, T> IntoIterator for &'a mut Lms<M, Box<[T]>>where
T: 'a,
Available on crate feature alloc only.
impl<'a, M, T> IntoIterator for &'a mut Lms<M, Box<[T]>>where
T: 'a,
alloc only.Source§impl<'a, M, T> IntoIterator for &'a mut Lms<M, Vec<T>>
Available on crate feature alloc only.
impl<'a, M, T> IntoIterator for &'a mut Lms<M, Vec<T>>
alloc only.Source§impl<'a, M, T> IntoIterator for Lms<M, &'a [T]>
impl<'a, M, T> IntoIterator for Lms<M, &'a [T]>
Source§impl<'a, M, T> IntoIterator for Lms<M, &'a mut [T]>
impl<'a, M, T> IntoIterator for Lms<M, &'a mut [T]>
Source§impl<M, T> IntoIterator for Lms<M, Vec<T>>
Available on crate feature alloc only.
impl<M, T> IntoIterator for Lms<M, Vec<T>>
alloc only.Source§impl<M, T> IsWithinBounds for Lms<M, T>where
T: PartialCmp + Stimulus,
<T as HasBoolMask>::Mask: BitAnd<Output = <T as HasBoolMask>::Mask>,
impl<M, T> IsWithinBounds for Lms<M, T>where
T: PartialCmp + Stimulus,
<T as HasBoolMask>::Mask: BitAnd<Output = <T as HasBoolMask>::Mask>,
Source§fn is_within_bounds(&self) -> <T as HasBoolMask>::Mask
fn is_within_bounds(&self) -> <T as HasBoolMask>::Mask
Source§impl<M, T> MulAssign<T> for Lms<M, T>
impl<M, T> MulAssign<T> for Lms<M, T>
Source§fn mul_assign(&mut self, c: T)
fn mul_assign(&mut self, c: T)
*= operation. Read moreSource§impl<M, T> MulAssign for Lms<M, T>where
T: MulAssign,
impl<M, T> MulAssign for Lms<M, T>where
T: MulAssign,
Source§fn mul_assign(&mut self, other: Lms<M, T>)
fn mul_assign(&mut self, other: Lms<M, T>)
*= operation. Read moreSource§impl<M, T> Premultiply for Lms<M, T>where
T: Real + Stimulus + Zero + IsValidDivisor + Mul<Output = T> + Div<Output = T> + Clone,
<T as HasBoolMask>::Mask: LazySelect<T> + Clone,
impl<M, T> Premultiply for Lms<M, T>where
T: Real + Stimulus + Zero + IsValidDivisor + Mul<Output = T> + Div<Output = T> + Clone,
<T as HasBoolMask>::Mask: LazySelect<T> + Clone,
Source§impl<M, T> RelativeEq for Lms<M, T>where
T: RelativeEq,
<T as AbsDiffEq>::Epsilon: Clone,
Available on crate feature approx only.
impl<M, T> RelativeEq for Lms<M, T>where
T: RelativeEq,
<T as AbsDiffEq>::Epsilon: Clone,
approx only.Source§fn default_max_relative() -> <T as AbsDiffEq>::Epsilon
fn default_max_relative() -> <T as AbsDiffEq>::Epsilon
Source§fn relative_eq(
&self,
other: &Lms<M, T>,
epsilon: <T as AbsDiffEq>::Epsilon,
max_relative: <T as AbsDiffEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &Lms<M, T>, epsilon: <T as AbsDiffEq>::Epsilon, max_relative: <T as AbsDiffEq>::Epsilon, ) -> bool
Source§fn relative_ne(
&self,
other: &Lms<M, T>,
epsilon: <T as AbsDiffEq>::Epsilon,
max_relative: <T as AbsDiffEq>::Epsilon,
) -> bool
fn relative_ne( &self, other: &Lms<M, T>, epsilon: <T as AbsDiffEq>::Epsilon, max_relative: <T as AbsDiffEq>::Epsilon, ) -> bool
RelativeEq::relative_eq].Source§impl<M, T> SaturatingAdd<T> for Lms<M, T>where
T: SaturatingAdd<Output = T> + Clone,
impl<M, T> SaturatingAdd<T> for Lms<M, T>where
T: SaturatingAdd<Output = T> + Clone,
Source§fn saturating_add(self, c: T) -> <Lms<M, T> as SaturatingAdd<T>>::Output
fn saturating_add(self, c: T) -> <Lms<M, T> as SaturatingAdd<T>>::Output
self and other, but saturates instead of overflowing.Source§impl<M, T> SaturatingAdd for Lms<M, T>where
T: SaturatingAdd<Output = T>,
impl<M, T> SaturatingAdd for Lms<M, T>where
T: SaturatingAdd<Output = T>,
Source§impl<M, T> SaturatingSub<T> for Lms<M, T>where
T: SaturatingSub<Output = T> + Clone,
impl<M, T> SaturatingSub<T> for Lms<M, T>where
T: SaturatingSub<Output = T> + Clone,
Source§fn saturating_sub(self, c: T) -> <Lms<M, T> as SaturatingSub<T>>::Output
fn saturating_sub(self, c: T) -> <Lms<M, T> as SaturatingSub<T>>::Output
self and other, but saturates instead of overflowing.Source§impl<M, T> SaturatingSub for Lms<M, T>where
T: SaturatingSub<Output = T>,
impl<M, T> SaturatingSub for Lms<M, T>where
T: SaturatingSub<Output = T>,
Source§impl<M, T> Serialize for Lms<M, T>where
T: Serialize,
impl<M, T> Serialize for Lms<M, T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl<M, T> SubAssign<T> for Lms<M, T>
impl<M, T> SubAssign<T> for Lms<M, T>
Source§fn sub_assign(&mut self, c: T)
fn sub_assign(&mut self, c: T)
-= operation. Read moreSource§impl<M, T> SubAssign for Lms<M, T>where
T: SubAssign,
impl<M, T> SubAssign for Lms<M, T>where
T: SubAssign,
Source§fn sub_assign(&mut self, other: Lms<M, T>)
fn sub_assign(&mut self, other: Lms<M, T>)
-= operation. Read moreSource§impl<M, T> UlpsEq for Lms<M, T>where
T: UlpsEq,
<T as AbsDiffEq>::Epsilon: Clone,
Available on crate feature approx only.
impl<M, T> UlpsEq for Lms<M, T>where
T: UlpsEq,
<T as AbsDiffEq>::Epsilon: Clone,
approx only.Source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
Source§impl<M, T, _A> WithAlpha<_A> for Lms<M, T>where
_A: Stimulus,
impl<M, T, _A> WithAlpha<_A> for Lms<M, T>where
_A: Stimulus,
Source§fn with_alpha(self, alpha: _A) -> <Lms<M, T> as WithAlpha<_A>>::WithAlpha
fn with_alpha(self, alpha: _A) -> <Lms<M, T> as WithAlpha<_A>>::WithAlpha
Self already has a transparency, it is
overwritten. Read moreSource§fn without_alpha(self) -> <Lms<M, T> as WithAlpha<_A>>::Color
fn without_alpha(self) -> <Lms<M, T> as WithAlpha<_A>>::Color
Self::Color has
an internal transparency field, that field will be set to
A::max_intensity() to make it opaque. Read moreSource§fn split(self) -> (<Lms<M, T> as WithAlpha<_A>>::Color, _A)
fn split(self) -> (<Lms<M, T> as WithAlpha<_A>>::Color, _A)
impl<M, T> Copy for Lms<M, T>where
T: Copy,
impl<M, T> Eq for Lms<M, T>where
T: Eq,
impl<M, T> StimulusColor for Lms<M, T>where
T: Stimulus,
Auto Trait Implementations§
impl<M, T> Freeze for Lms<M, T>where
T: Freeze,
impl<M, T> RefUnwindSafe for Lms<M, T>where
T: RefUnwindSafe,
M: RefUnwindSafe,
impl<M, T> Send for Lms<M, T>
impl<M, T> Sync for Lms<M, T>
impl<M, T> Unpin for Lms<M, T>
impl<M, T> UnsafeUnpin for Lms<M, T>where
T: UnsafeUnpin,
impl<M, T> UnwindSafe for Lms<M, T>where
T: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptFrom<S, Swp, Dwp, T> for Dwhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
S: IntoColorUnclamped<Xyz<Swp, T>>,
D: FromColorUnclamped<Xyz<Dwp, T>>,
impl<S, D, Swp, Dwp, T> AdaptFrom<S, Swp, Dwp, T> for Dwhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
S: IntoColorUnclamped<Xyz<Swp, T>>,
D: FromColorUnclamped<Xyz<Dwp, T>>,
Source§fn adapt_from_using<M>(color: S, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_from_using<M>(color: S, method: M) -> Dwhere
M: TransformMatrix<T>,
replaced by palette::chromatic_adaptation::AdaptFromUnclamped
Source§fn adapt_from(color: S) -> Self
fn adapt_from(color: S) -> Self
replaced by palette::chromatic_adaptation::AdaptFromUnclamped
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
replaced by palette::chromatic_adaptation::AdaptIntoUnclamped
Source§impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
impl<T, C> AdaptIntoUnclamped<T> for Cwhere
T: AdaptFromUnclamped<C>,
Source§type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
type Scalar = <T as AdaptFromUnclamped<C>>::Scalar
Source§fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
fn adapt_into_unclamped_with<M>(self) -> Twhere
M: LmsToXyz<<C as AdaptIntoUnclamped<T>>::Scalar> + XyzToLms<<C as AdaptIntoUnclamped<T>>::Scalar>,
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
impl<T, Res> Apply<Res> for Twhere
T: ?Sized,
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
Source§impl<C, T, const N: usize> Blend for Cwhere
C: Premultiply<Scalar = T> + StimulusColor + ArrayCast<Array = [T; N]> + Clone,
T: Real + Zero + One + MinMax + Clamp + Sqrt + Abs + Arithmetics + PartialCmp + Clone,
<T as HasBoolMask>::Mask: LazySelect<T>,
impl<C, T, const N: usize> Blend for Cwhere
C: Premultiply<Scalar = T> + StimulusColor + ArrayCast<Array = [T; N]> + Clone,
T: Real + Zero + One + MinMax + Clamp + Sqrt + Abs + Arithmetics + PartialCmp + Clone,
<T as HasBoolMask>::Mask: LazySelect<T>,
Source§fn multiply(self, other: C) -> C
fn multiply(self, other: C) -> C
self with other. This uses the alpha component to regulate
the effect, so it’s not just plain component wise multiplication.Source§fn overlay(self, other: C) -> C
fn overlay(self, other: C) -> C
self or other if other is dark, or screen them if other
is light. This results in an S curve.Source§fn dodge(self, other: C) -> C
fn dodge(self, other: C) -> C
other to reflect self. Results in other if self is
black.Source§fn hard_light(self, other: C) -> C
fn hard_light(self, other: C) -> C
self or other if other is dark, or screen them if self
is light. This is similar to overlay, but depends on self instead
of other.Source§fn soft_light(self, other: C) -> C
fn soft_light(self, other: C) -> C
other if self is light, or darken other as if it’s burned
if self is dark. The effect is increased if the components of self
is further from 0.5.Source§fn difference(self, other: C) -> C
fn difference(self, other: C) -> C
self and other. It’s
basically abs(self - other), but regulated by the alpha component.Source§impl<C> BlendWith for C
impl<C> BlendWith for C
Source§fn blend_with<F>(self, other: C, blend_function: F) -> C
fn blend_with<F>(self, other: C, blend_function: F) -> C
destination, using
blend_function. Anything that implements BlendFunction is
acceptable, including functions and closures. Read moreSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<C> Compose for C
impl<C> Compose for C
Source§fn over(self, other: C) -> C
fn over(self, other: C) -> C
self over other. This is the good old common alpha composition
equation.Source§fn inside(self, other: C) -> C
fn inside(self, other: C) -> C
self that overlaps the visible parts of
other.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromColor<T> for Uwhere
U: FromColorUnclamped<T> + Clamp,
impl<T, U> FromColor<T> for Uwhere
U: FromColorUnclamped<T> + Clamp,
Source§fn from_color(t: T) -> U
fn from_color(t: T) -> U
Source§impl<T, U> FromColorMut<U> for T
impl<T, U> FromColorMut<U> for T
Source§fn from_color_mut(color: &mut U) -> FromColorMutGuard<'_, T, U>
fn from_color_mut(color: &mut U) -> FromColorMutGuard<'_, T, U>
Source§impl<T, U> FromColorUnclampedMut<U> for Twhere
T: FromColorUnclamped<U> + ArrayCast + Clone,
U: FromColorUnclamped<T> + ArrayCast<Array = <T as ArrayCast>::Array> + Clone,
impl<T, U> FromColorUnclampedMut<U> for Twhere
T: FromColorUnclamped<U> + ArrayCast + Clone,
U: FromColorUnclamped<T> + ArrayCast<Array = <T as ArrayCast>::Array> + Clone,
Source§fn from_color_unclamped_mut(
color: &mut U,
) -> FromColorUnclampedMutGuard<'_, T, U>
fn from_color_unclamped_mut( color: &mut U, ) -> FromColorUnclampedMutGuard<'_, T, U>
Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.§impl<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorMut<T> for U
impl<T, U> IntoColorMut<T> for U
Source§fn into_color_mut(&mut self) -> FromColorMutGuard<'_, T, U>
fn into_color_mut(&mut self) -> FromColorMutGuard<'_, T, U>
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Source§impl<T, U> IntoColorUnclampedMut<T> for U
impl<T, U> IntoColorUnclampedMut<T> for U
Source§fn into_color_unclamped_mut(&mut self) -> FromColorUnclampedMutGuard<'_, T, U>
fn into_color_unclamped_mut(&mut self) -> FromColorUnclampedMutGuard<'_, T, U>
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<'a, T> ParamCurveMoments<'a> for Twhere
T: 'a,
&'a T: IntoIterator<Item = PathEl>,
impl<'a, T> ParamCurveMoments<'a> for Twhere
T: 'a,
&'a T: IntoIterator<Item = PathEl>,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
self into the result. Upper case
letters are used (e.g. F9B4CA)Source§impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryFromColor<T> for U
impl<T, U> TryFromColor<T> for U
Source§fn try_from_color(t: T) -> Result<U, OutOfBounds<U>>
fn try_from_color(t: T) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read moreSource§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more