Enum pax_runtime_api::ColorChannel
source · pub enum ColorChannel {
Integer(Numeric),
Percent(Numeric),
}
Variants§
Implementations§
source§impl ColorChannel
impl ColorChannel
sourcepub fn to_float_0_1(&self) -> f64
pub fn to_float_0_1(&self) -> f64
Normalizes this ColorChannel as a float [0.0, 1.0]
Trait Implementations§
source§impl Clone for ColorChannel
impl Clone for ColorChannel
source§fn clone(&self) -> ColorChannel
fn clone(&self) -> ColorChannel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ColorChannel
impl Debug for ColorChannel
source§impl Default for ColorChannel
impl Default for ColorChannel
source§impl<'de> Deserialize<'de> for ColorChannel
impl<'de> Deserialize<'de> for ColorChannel
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<IntoableLiteral> for ColorChannel
impl From<IntoableLiteral> for ColorChannel
source§fn from(value: IntoableLiteral) -> Self
fn from(value: IntoableLiteral) -> Self
Converts to this type from the input type.
source§impl From<Numeric> for ColorChannel
impl From<Numeric> for ColorChannel
source§impl From<f64> for ColorChannel
impl From<f64> for ColorChannel
source§impl From<isize> for ColorChannel
impl From<isize> for ColorChannel
source§impl Into<ColorChannel> for Percent
impl Into<ColorChannel> for Percent
source§fn into(self) -> ColorChannel
fn into(self) -> ColorChannel
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for ColorChannel
impl RefUnwindSafe for ColorChannel
impl Send for ColorChannel
impl Sync for ColorChannel
impl Unpin for ColorChannel
impl UnwindSafe for ColorChannel
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.