#[repr(transparent)]pub struct Factor(pub f32);Expand description
Normalized multiplication factor.
Values of this type are normalized to generally be in between 0.0 and 1.0 to indicate a fraction
of a unit. However, values are not clamped to this range, Factor(2.0) is a valid value and so are
negative values.
§Equality
Equality is determined to within 0.00001 epsilon.
Tuple Fields§
§0: f32Implementations§
Trait Implementations§
Source§impl AddAssign for Factor
impl AddAssign for Factor
Source§fn add_assign(&mut self, rhs: Factor)
fn add_assign(&mut self, rhs: Factor)
Performs the
+= operation. Read moreSource§impl<'de> Deserialize<'de> for Factor
impl<'de> Deserialize<'de> for Factor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Factor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Factor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Div<Factor> for FactorPercent
impl Div<Factor> for FactorPercent
Source§type Output = FactorPercent
type Output = FactorPercent
The resulting type after applying the
/ operator.Source§impl DivAssign<Factor> for Dip
impl DivAssign<Factor> for Dip
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Factor2d
impl DivAssign<Factor> for Factor2d
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for FactorPercent
impl DivAssign<Factor> for FactorPercent
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Point2D<Dip, Dip>
impl DivAssign<Factor> for Point2D<Dip, Dip>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Point2D<Px, Px>
impl DivAssign<Factor> for Point2D<Px, Px>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Point2D<f32, Px>
impl DivAssign<Factor> for Point2D<f32, Px>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Px
impl DivAssign<Factor> for Px
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Rect<Dip, Dip>
impl DivAssign<Factor> for Rect<Dip, Dip>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Rect<Px, Px>
impl DivAssign<Factor> for Rect<Px, Px>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Size2D<Dip, Dip>
impl DivAssign<Factor> for Size2D<Dip, Dip>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Size2D<Px, Px>
impl DivAssign<Factor> for Size2D<Px, Px>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Size2D<f32, Px>
impl DivAssign<Factor> for Size2D<f32, Px>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Vector2D<Dip, Dip>
impl DivAssign<Factor> for Vector2D<Dip, Dip>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for Vector2D<Px, Px>
impl DivAssign<Factor> for Vector2D<Px, Px>
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign for Factor
impl DivAssign for Factor
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl From<Factor> for FactorPercent
impl From<Factor> for FactorPercent
Source§fn from(value: Factor) -> FactorPercent
fn from(value: Factor) -> FactorPercent
Converts to this type from the input type.
Source§impl From<Factor> for GridSpacing
impl From<Factor> for GridSpacing
Source§impl From<Factor> for RgbaComponent
Color channel value is in the [0..=1] range.
impl From<Factor> for RgbaComponent
Color channel value is in the [0..=1] range.
Source§fn from(f: Factor) -> RgbaComponent
fn from(f: Factor) -> RgbaComponent
Converts to this type from the input type.
Source§impl From<Factor> for SideOffsets
impl From<Factor> for SideOffsets
Source§impl From<Factor> for Vector
impl From<Factor> for Vector
Source§fn from(norm: Factor) -> Self
fn from(norm: Factor) -> Self
Conversion to Length::Factor then to vector.
Source§impl From<FactorPercent> for Factor
impl From<FactorPercent> for Factor
Source§fn from(value: FactorPercent) -> Factor
fn from(value: FactorPercent) -> Factor
Converts to this type from the input type.
Source§impl IntoVar<EasingTime> for Factor
impl IntoVar<EasingTime> for Factor
fn into_var(self) -> Var<EasingTime>
Source§impl IntoVar<FactorPercent> for Factor
impl IntoVar<FactorPercent> for Factor
fn into_var(self) -> Var<FactorPercent>
Source§impl IntoVar<FactorSideOffsets> for Factor
impl IntoVar<FactorSideOffsets> for Factor
Source§fn into_var(self) -> Var<FactorSideOffsets>
fn into_var(self) -> Var<FactorSideOffsets>
All sides equal.
Source§impl IntoVar<GridSpacing> for Factor
impl IntoVar<GridSpacing> for Factor
Source§fn into_var(self) -> Var<GridSpacing>
fn into_var(self) -> Var<GridSpacing>
Column and row equal relative length.
Source§impl IntoVar<SideOffsets> for Factor
impl IntoVar<SideOffsets> for Factor
Source§fn into_var(self) -> Var<SideOffsets>
fn into_var(self) -> Var<SideOffsets>
All sides equal relative length.
Source§impl Mul<Factor> for FactorPercent
impl Mul<Factor> for FactorPercent
Source§type Output = FactorPercent
type Output = FactorPercent
The resulting type after applying the
* operator.Source§impl MulAssign<Factor> for Dip
impl MulAssign<Factor> for Dip
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Factor2d
impl MulAssign<Factor> for Factor2d
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for FactorPercent
impl MulAssign<Factor> for FactorPercent
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Point2D<Dip, Dip>
impl MulAssign<Factor> for Point2D<Dip, Dip>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Point2D<Px, Px>
impl MulAssign<Factor> for Point2D<Px, Px>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Point2D<f32, Px>
impl MulAssign<Factor> for Point2D<f32, Px>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Px
impl MulAssign<Factor> for Px
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Rect<Dip, Dip>
impl MulAssign<Factor> for Rect<Dip, Dip>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Rect<Px, Px>
impl MulAssign<Factor> for Rect<Px, Px>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Size2D<Dip, Dip>
impl MulAssign<Factor> for Size2D<Dip, Dip>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Size2D<Px, Px>
impl MulAssign<Factor> for Size2D<Px, Px>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Size2D<f32, Px>
impl MulAssign<Factor> for Size2D<f32, Px>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Vector2D<Dip, Dip>
impl MulAssign<Factor> for Vector2D<Dip, Dip>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for Vector2D<Px, Px>
impl MulAssign<Factor> for Vector2D<Px, Px>
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign for Factor
impl MulAssign for Factor
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl Ord for Factor
impl Ord for Factor
Source§impl PartialOrd for Factor
impl PartialOrd for Factor
Source§impl Serialize for Factor
impl Serialize for Factor
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
Source§impl SubAssign for Factor
impl SubAssign for Factor
Source§fn sub_assign(&mut self, rhs: Factor)
fn sub_assign(&mut self, rhs: Factor)
Performs the
-= operation. Read moreSource§impl Transitionable for Factor
impl Transitionable for Factor
impl Copy for Factor
impl Eq for Factor
impl IntoValue<Align> for Factor
impl IntoValue<EasingTime> for Factor
impl IntoValue<Factor> for FactorPercent
impl IntoValue<Factor2d> for Factor
impl IntoValue<FactorPercent> for Factor
impl IntoValue<FactorSideOffsets> for Factor
impl IntoValue<GridSpacing> for Factor
impl IntoValue<Length> for Factor
impl IntoValue<Point> for Factor
impl IntoValue<SideOffsets> for Factor
impl IntoValue<Size> for Factor
impl IntoValue<Vector> for Factor
impl Pod for Factor
Auto Trait Implementations§
impl Freeze for Factor
impl RefUnwindSafe for Factor
impl Send for Factor
impl Sync for Factor
impl Unpin for Factor
impl UnwindSafe for Factor
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Clone the value.
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
Swap value with
other if both are of the same type.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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more