pub struct Percent(pub Numeric);
Expand description
Raw Percent type, which we use for serialization and dynamic traversal. At the time
of authoring, this type is not used directly at runtime, but is intended for into
coercion
into downstream types, e.g. ColorChannel, Rotation, and Size. This allows us to be “dumb”
about how we parse %
, and allow the context in which it is used to pull forward a specific
type through into
inference.
Tuple Fields§
§0: Numeric
Trait Implementations§
Source§impl CoercionRules for Percent
impl CoercionRules for Percent
Source§impl<'de> Deserialize<'de> for Percent
impl<'de> Deserialize<'de> for Percent
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 Interpolatable for Percent
impl Interpolatable for Percent
fn interpolate(&self, other: &Self, t: f64) -> Self
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 ToPaxValue for Percent
impl ToPaxValue for Percent
fn to_pax_value(self) -> PaxValue
impl StructuralPartialEq for Percent
Auto Trait Implementations§
impl Freeze for Percent
impl RefUnwindSafe for Percent
impl Send for Percent
impl Sync for Percent
impl Unpin for Percent
impl UnwindSafe for Percent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.