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§fn default() -> ColorChannel
fn default() -> ColorChannel
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ColorChannel
impl<'de> Deserialize<'de> for ColorChannel
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ColorChannel, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ColorChannel, <__D as Deserializer<'de>>::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) -> ColorChannel
fn from(value: IntoableLiteral) -> ColorChannel
Converts to this type from the input type.
source§impl From<Numeric> for ColorChannel
impl From<Numeric> for ColorChannel
source§fn from(value: Numeric) -> ColorChannel
fn from(value: Numeric) -> ColorChannel
Converts to this type from the input type.
source§impl From<f64> for ColorChannel
impl From<f64> for ColorChannel
source§fn from(value: f64) -> ColorChannel
fn from(value: f64) -> ColorChannel
Converts to this type from the input type.
source§impl From<isize> for ColorChannel
impl From<isize> for ColorChannel
source§fn from(value: isize) -> ColorChannel
fn from(value: isize) -> ColorChannel
Converts to this type from the input type.
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.
source§impl Serialize for ColorChannel
impl Serialize for ColorChannel
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,
Serialize this value into the given Serde serializer. Read more
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.