#[repr(C)]pub struct OklabHue<T = f32>(/* private fields */);
Expand description
A hue type for the Oklab color space.
It’s measured in degrees.
The hue is a circular type, where 0
and 360
is the same, and
it’s normalized to (-180, 180]
when it’s converted to a linear
number (like f32
). This makes many calculations easier, but may
also have some surprising effects if it’s expected to act as a
linear number.
Implementations§
source§impl<T> OklabHue<T>
impl<T> OklabHue<T>
sourcepub const fn new(angle: T) -> OklabHue<T>
pub const fn new(angle: T) -> OklabHue<T>
Create a new hue, specified in the default unit for the angle
type T
.
f32
, f64
and other real number types represent degrees,
while u8
simply represents the range [0, 360]
as [0, 256]
.
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Get the internal representation without normalizing or converting it.
f32
, f64
and other real number types represent degrees,
while u8
simply represents the range [0, 360]
as [0, 256]
.
sourcepub fn into_format<U>(self) -> OklabHue<U>where
U: FromAngle<T>,
pub fn into_format<U>(self) -> OklabHue<U>where
U: FromAngle<T>,
Convert into another angle type.
sourcepub fn from_format<U>(hue: OklabHue<U>) -> OklabHue<T>where
T: FromAngle<U>,
pub fn from_format<U>(hue: OklabHue<U>) -> OklabHue<T>where
T: FromAngle<U>,
Convert from another angle type.
source§impl<T> OklabHue<T>where
T: RealAngle,
impl<T> OklabHue<T>where
T: RealAngle,
sourcepub fn from_degrees(degrees: T) -> OklabHue<T>
pub fn from_degrees(degrees: T) -> OklabHue<T>
Create a new hue from degrees. This is an alias for new
.
sourcepub fn from_radians(radians: T) -> OklabHue<T>
pub fn from_radians(radians: T) -> OklabHue<T>
Create a new hue from radians, instead of degrees.
sourcepub fn into_raw_degrees(self) -> T
pub fn into_raw_degrees(self) -> T
Get the internal representation as degrees, without normalizing it.
sourcepub fn into_raw_radians(self) -> T
pub fn into_raw_radians(self) -> T
Get the internal representation as radians, without normalizing it.
source§impl<T> OklabHue<T>where
T: RealAngle + SignedAngle,
impl<T> OklabHue<T>where
T: RealAngle + SignedAngle,
sourcepub fn into_degrees(self) -> T
pub fn into_degrees(self) -> T
Get the hue as degrees, in the range (-180, 180]
.
sourcepub fn into_radians(self) -> T
pub fn into_radians(self) -> T
Convert the hue to radians, in the range (-π, π]
.
source§impl<T> OklabHue<T>where
T: RealAngle + UnsignedAngle,
impl<T> OklabHue<T>where
T: RealAngle + UnsignedAngle,
sourcepub fn into_positive_degrees(self) -> T
pub fn into_positive_degrees(self) -> T
Convert the hue to positive degrees, in the range [0, 360)
.
sourcepub fn into_positive_radians(self) -> T
pub fn into_positive_radians(self) -> T
Convert the hue to positive radians, in the range [0, 2π)
.
source§impl<T> OklabHue<T>where
T: RealAngle + Trigonometry,
impl<T> OklabHue<T>where
T: RealAngle + Trigonometry,
sourcepub fn from_cartesian(a: T, b: T) -> OklabHue<T>
pub fn from_cartesian(a: T, b: T) -> OklabHue<T>
Returns a hue from a
and b
, normalized to [0°, 360°)
.
If a
and b
are both 0
, returns 0
,
sourcepub fn into_cartesian(self) -> (T, T)
pub fn into_cartesian(self) -> (T, T)
Returns a
and b
values for this hue, normalized to [-1, 1]
.
They will have to be multiplied by a radius values, such as saturation, value, chroma, etc., to represent a specific color.
source§impl<C> OklabHue<C>
impl<C> OklabHue<C>
sourcepub fn iter<'a>(&'a self) -> <&'a OklabHue<C> as IntoIterator>::IntoIterwhere
&'a OklabHue<C>: IntoIterator,
pub fn iter<'a>(&'a self) -> <&'a OklabHue<C> as IntoIterator>::IntoIterwhere
&'a OklabHue<C>: IntoIterator,
Return an iterator over the hues in the wrapped collection.
sourcepub fn iter_mut<'a>(
&'a mut self,
) -> <&'a mut OklabHue<C> as IntoIterator>::IntoIterwhere
&'a mut OklabHue<C>: IntoIterator,
pub fn iter_mut<'a>(
&'a mut self,
) -> <&'a mut OklabHue<C> as IntoIterator>::IntoIterwhere
&'a mut OklabHue<C>: IntoIterator,
Return an iterator that allows modifying the hues in the wrapped collection.
sourcepub fn get<'a, I, T>(
&'a self,
index: I,
) -> Option<OklabHue<&'a <I as SliceIndex<[T]>>::Output>>
pub fn get<'a, I, T>( &'a self, index: I, ) -> Option<OklabHue<&'a <I as SliceIndex<[T]>>::Output>>
Get a hue, or slice of hues, with references to the values at index
. See slice::get
for details.
sourcepub fn get_mut<'a, I, T>(
&'a mut self,
index: I,
) -> Option<OklabHue<&'a mut <I as SliceIndex<[T]>>::Output>>
pub fn get_mut<'a, I, T>( &'a mut self, index: I, ) -> Option<OklabHue<&'a mut <I as SliceIndex<[T]>>::Output>>
Get a hue, or slice of hues, that allows modifying the values at index
. See slice::get_mut
for details.
source§impl<T> OklabHue<Vec<T>>
impl<T> OklabHue<Vec<T>>
sourcepub fn with_capacity(capacity: usize) -> OklabHue<Vec<T>>
pub fn with_capacity(capacity: usize) -> OklabHue<Vec<T>>
Create a struct with a vector with a minimum capacity. See Vec::with_capacity
for details.
sourcepub fn push(&mut self, value: OklabHue<T>)
pub fn push(&mut self, value: OklabHue<T>)
Push an additional hue onto the hue vector. See Vec::push
for details.
sourcepub fn pop(&mut self) -> Option<OklabHue<T>>
pub fn pop(&mut self) -> Option<OklabHue<T>>
Pop a hue from the hue vector. See Vec::pop
for details.
sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Clear the hue vector. See Vec::clear
for details.
sourcepub fn drain<R>(&mut self, range: R) -> OklabHueIter<Drain<'_, T>>
pub fn drain<R>(&mut self, range: R) -> OklabHueIter<Drain<'_, T>>
Return an iterator that moves hues out of the specified range.
Trait Implementations§
source§impl<T> AbsDiffEq for OklabHue<T>where
T: Zero + AngleEq<Mask = bool> + Sub<Output = T> + RealAngle + AbsDiffEq + Clone + SignedAngle,
<T as AbsDiffEq>::Epsilon: HalfRotation + Mul<Output = <T as AbsDiffEq>::Epsilon>,
impl<T> AbsDiffEq for OklabHue<T>where
T: Zero + AngleEq<Mask = bool> + Sub<Output = T> + RealAngle + AbsDiffEq + Clone + SignedAngle,
<T as AbsDiffEq>::Epsilon: HalfRotation + Mul<Output = <T as AbsDiffEq>::Epsilon>,
source§fn default_epsilon() -> <OklabHue<T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <OklabHue<T> as AbsDiffEq>::Epsilon
source§fn abs_diff_eq(
&self,
other: &OklabHue<T>,
epsilon: <T as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_eq( &self, other: &OklabHue<T>, epsilon: <T as AbsDiffEq>::Epsilon, ) -> bool
source§fn abs_diff_ne(
&self,
other: &OklabHue<T>,
epsilon: <T as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_ne( &self, other: &OklabHue<T>, epsilon: <T as AbsDiffEq>::Epsilon, ) -> bool
AbsDiffEq::abs_diff_eq
].source§impl AddAssign<OklabHue> for f32
impl AddAssign<OklabHue> for f32
source§fn add_assign(&mut self, other: OklabHue)
fn add_assign(&mut self, other: OklabHue)
+=
operation. Read moresource§impl<T> AddAssign<T> for OklabHue<T>where
T: AddAssign,
impl<T> AddAssign<T> for OklabHue<T>where
T: AddAssign,
source§fn add_assign(&mut self, other: T)
fn add_assign(&mut self, other: T)
+=
operation. Read moresource§impl<T> AddAssign for OklabHue<T>where
T: AddAssign,
impl<T> AddAssign for OklabHue<T>where
T: AddAssign,
source§fn add_assign(&mut self, other: OklabHue<T>)
fn add_assign(&mut self, other: OklabHue<T>)
+=
operation. Read moresource§impl<C, T> Extend<T> for OklabHue<C>where
C: Extend<T>,
impl<C, T> Extend<T> for OklabHue<C>where
C: Extend<T>,
source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = T>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = 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<'a, 'b, T> IntoIterator for &'a OklabHue<&'b [T]>
impl<'a, 'b, T> IntoIterator for &'a OklabHue<&'b [T]>
source§impl<'a, 'b, T> IntoIterator for &'a OklabHue<&'b mut [T]>
impl<'a, 'b, T> IntoIterator for &'a OklabHue<&'b mut [T]>
source§type IntoIter = OklabHueIter<Iter<'a, T>>
type IntoIter = OklabHueIter<Iter<'a, T>>
source§impl<'a, T> IntoIterator for &'a OklabHue<Vec<T>>
impl<'a, T> IntoIterator for &'a OklabHue<Vec<T>>
source§impl<'a, 'b, T> IntoIterator for &'a mut OklabHue<&'b mut [T]>
impl<'a, 'b, T> IntoIterator for &'a mut OklabHue<&'b mut [T]>
source§type IntoIter = OklabHueIter<IterMut<'a, T>>
type IntoIter = OklabHueIter<IterMut<'a, T>>
source§impl<'a, T, const N: usize> IntoIterator for &'a mut OklabHue<[T; N]>
impl<'a, T, const N: usize> IntoIterator for &'a mut OklabHue<[T; N]>
source§type IntoIter = OklabHueIter<IterMut<'a, T>>
type IntoIter = OklabHueIter<IterMut<'a, T>>
source§impl<'a, T> IntoIterator for &'a mut OklabHue<Box<[T]>>
impl<'a, T> IntoIterator for &'a mut OklabHue<Box<[T]>>
source§type IntoIter = OklabHueIter<IterMut<'a, T>>
type IntoIter = OklabHueIter<IterMut<'a, T>>
source§impl<'a, T> IntoIterator for &'a mut OklabHue<Vec<T>>
impl<'a, T> IntoIterator for &'a mut OklabHue<Vec<T>>
source§type IntoIter = OklabHueIter<IterMut<'a, T>>
type IntoIter = OklabHueIter<IterMut<'a, T>>
source§impl<'a, T> IntoIterator for OklabHue<&'a [T]>
impl<'a, T> IntoIterator for OklabHue<&'a [T]>
source§impl<'a, T> IntoIterator for OklabHue<&'a mut [T]>
impl<'a, T> IntoIterator for OklabHue<&'a mut [T]>
source§type IntoIter = OklabHueIter<IterMut<'a, T>>
type IntoIter = OklabHueIter<IterMut<'a, T>>
source§impl<T> IntoIterator for OklabHue<Vec<T>>
impl<T> IntoIterator for OklabHue<Vec<T>>
source§impl ProtoColor for OklabHue
impl ProtoColor for OklabHue
source§fn saturation(&self) -> Option<ZeroToOne>
fn saturation(&self) -> Option<ZeroToOne>
source§fn into_source(
self,
saturation_if_not_provided: impl Into<ZeroToOne>,
) -> ColorSource
fn into_source( self, saturation_if_not_provided: impl Into<ZeroToOne>, ) -> ColorSource
source§impl<T> RelativeEq for OklabHue<T>where
T: Zero + AngleEq<Mask = bool> + Sub<Output = T> + RealAngle + Clone + RelativeEq + SignedAngle,
<T as AbsDiffEq>::Epsilon: HalfRotation + Mul<Output = <T as AbsDiffEq>::Epsilon>,
impl<T> RelativeEq for OklabHue<T>where
T: Zero + AngleEq<Mask = bool> + Sub<Output = T> + RealAngle + Clone + RelativeEq + SignedAngle,
<T as AbsDiffEq>::Epsilon: HalfRotation + Mul<Output = <T as AbsDiffEq>::Epsilon>,
source§fn default_max_relative() -> <OklabHue<T> as AbsDiffEq>::Epsilon
fn default_max_relative() -> <OklabHue<T> as AbsDiffEq>::Epsilon
source§fn relative_eq(
&self,
other: &OklabHue<T>,
epsilon: <T as AbsDiffEq>::Epsilon,
max_relative: <T as AbsDiffEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &OklabHue<T>, epsilon: <T as AbsDiffEq>::Epsilon, max_relative: <T as AbsDiffEq>::Epsilon, ) -> bool
source§impl<T> SaturatingAdd<T> for OklabHue<T>where
T: SaturatingAdd<Output = T>,
impl<T> SaturatingAdd<T> for OklabHue<T>where
T: SaturatingAdd<Output = T>,
source§impl<T> SaturatingAdd for OklabHue<T>where
T: SaturatingAdd<Output = T>,
impl<T> SaturatingAdd for OklabHue<T>where
T: SaturatingAdd<Output = T>,
source§impl<T> SaturatingSub<T> for OklabHue<T>where
T: SaturatingSub<Output = T>,
impl<T> SaturatingSub<T> for OklabHue<T>where
T: SaturatingSub<Output = T>,
source§impl<T> SaturatingSub for OklabHue<T>where
T: SaturatingSub<Output = T>,
impl<T> SaturatingSub for OklabHue<T>where
T: SaturatingSub<Output = T>,
source§impl SubAssign<OklabHue> for f32
impl SubAssign<OklabHue> for f32
source§fn sub_assign(&mut self, other: OklabHue)
fn sub_assign(&mut self, other: OklabHue)
-=
operation. Read moresource§impl<T> SubAssign<T> for OklabHue<T>where
T: SubAssign,
impl<T> SubAssign<T> for OklabHue<T>where
T: SubAssign,
source§fn sub_assign(&mut self, other: T)
fn sub_assign(&mut self, other: T)
-=
operation. Read moresource§impl<T> SubAssign for OklabHue<T>where
T: SubAssign,
impl<T> SubAssign for OklabHue<T>where
T: SubAssign,
source§fn sub_assign(&mut self, other: OklabHue<T>)
fn sub_assign(&mut self, other: OklabHue<T>)
-=
operation. Read moresource§impl<T> UlpsEq for OklabHue<T>where
T: Zero + AngleEq<Mask = bool> + Sub<Output = T> + RealAngle + Clone + UlpsEq + SignedAngle,
<T as AbsDiffEq>::Epsilon: HalfRotation + Mul<Output = <T as AbsDiffEq>::Epsilon>,
impl<T> UlpsEq for OklabHue<T>where
T: Zero + AngleEq<Mask = bool> + Sub<Output = T> + RealAngle + Clone + UlpsEq + SignedAngle,
<T as AbsDiffEq>::Epsilon: HalfRotation + Mul<Output = <T as AbsDiffEq>::Epsilon>,
source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
impl<T> Copy for OklabHue<T>where
T: Copy,
impl<T> Eq for OklabHue<T>
Auto Trait Implementations§
impl<T> Freeze for OklabHue<T>where
T: Freeze,
impl<T> RefUnwindSafe for OklabHue<T>where
T: RefUnwindSafe,
impl<T> Send for OklabHue<T>where
T: Send,
impl<T> Sync for OklabHue<T>where
T: Sync,
impl<T> Unpin for OklabHue<T>where
T: Unpin,
impl<T> UnwindSafe for OklabHue<T>where
T: UnwindSafe,
Blanket Implementations§
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>,
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
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
§impl<T> AsRelative for T
impl<T> AsRelative for T
§fn percent_width(self) -> RelativeSize
fn percent_width(self) -> RelativeSize
§fn percent_height(self) -> RelativeSize
fn percent_height(self) -> RelativeSize
source§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.§impl<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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
§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
§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> 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>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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
.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> 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
§impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
impl<Unit> IntoComponents<Unit> for Unitwhere
Unit: Copy,
§fn into_components(self) -> (Unit, Unit)
fn into_components(self) -> (Unit, Unit)
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoReadOnly<T> for T
impl<T> IntoReadOnly<T> for T
source§fn into_read_only(self) -> ReadOnly<T>
fn into_read_only(self) -> ReadOnly<T>
self
as a ReadOnly
.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.source§impl<T> IntoValue<T> for T
impl<T> IntoValue<T> for T
source§fn into_value(self) -> Value<T>
fn into_value(self) -> Value<T>
Value
.source§impl<T> IntoWidgetList for Twhere
T: MakeWidgetList,
impl<T> IntoWidgetList for Twhere
T: MakeWidgetList,
source§fn into_widget_list(self) -> Value<WidgetList>
fn into_widget_list(self) -> Value<WidgetList>
Value<WidgetList>
.source§fn into_columns(self) -> Stack
fn into_columns(self) -> Stack
self
as a horizontal Stack
of columns.source§fn into_layers(self) -> Layers
fn into_layers(self) -> Layers
self
as Layers
, with the widgets being stacked in the Z
direction.source§impl<I> MakeWidgetList for I
impl<I> MakeWidgetList for I
source§fn make_widget_list(self) -> WidgetList
fn make_widget_list(self) -> WidgetList
WidgetList
.source§fn and<W>(self, widget: W) -> WidgetListwhere
W: MakeWidget,
fn and<W>(self, widget: W) -> WidgetListwhere
W: MakeWidget,
widget
to self and returns the updated list.§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<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.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> 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