#[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 Div<Factor> for LayerIndex
impl Div<Factor> for LayerIndex
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 LayerIndex
impl DivAssign<Factor> for LayerIndex
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<Factor> for ZIndex
impl DivAssign<Factor> for ZIndex
Source§fn div_assign(&mut self, rhs: Factor)
fn div_assign(&mut self, rhs: Factor)
Performs the
/= operation. Read moreSource§impl DivAssign<Factor> for usize
impl DivAssign<Factor> for usize
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 CornerRadius
impl From<Factor> for CornerRadius
Source§fn from(norm: Factor) -> CornerRadius
fn from(norm: Factor) -> CornerRadius
All corners same relative length.
Source§impl From<Factor> for EasingTime
impl From<Factor> for EasingTime
Source§fn from(factor: Factor) -> EasingTime
fn from(factor: Factor) -> EasingTime
Converts to this type from the input type.
Source§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 FactorSideOffsets
impl From<Factor> for FactorSideOffsets
Source§fn from(all: Factor) -> FactorSideOffsets
fn from(all: Factor) -> FactorSideOffsets
All sides equal.
Source§impl From<Factor> for FontStretch
impl From<Factor> for FontStretch
Source§fn from(fct: Factor) -> FontStretch
fn from(fct: Factor) -> FontStretch
Converts to this type from the input type.
Source§impl From<Factor> for GradientRadius
impl From<Factor> for GradientRadius
Source§fn from(norm: Factor) -> GradientRadius
fn from(norm: Factor) -> GradientRadius
Conversion to Length::Factor and to radius.
Source§impl From<Factor> for GradientStop
impl From<Factor> for GradientStop
Source§fn from(color_hint: Factor) -> GradientStop
fn from(color_hint: Factor) -> GradientStop
Conversion to Length::Factor color hint.
Source§impl From<Factor> for GridSpacing
impl From<Factor> for GridSpacing
Source§fn from(norm: Factor) -> GridSpacing
fn from(norm: Factor) -> GridSpacing
Column and row equal relative length.
Source§impl From<Factor> for SideOffsets
impl From<Factor> for SideOffsets
Source§fn from(norm: Factor) -> SideOffsets
fn from(norm: Factor) -> SideOffsets
All sides equal relative length.
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<CornerRadius> for Factor
impl IntoVar<CornerRadius> for Factor
Source§fn into_var(self) -> Var<CornerRadius>
fn into_var(self) -> Var<CornerRadius>
All corners same relative length.
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<FontStretch> for Factor
impl IntoVar<FontStretch> for Factor
fn into_var(self) -> Var<FontStretch>
Source§impl IntoVar<GradientRadius> for Factor
impl IntoVar<GradientRadius> for Factor
Source§fn into_var(self) -> Var<GradientRadius>
fn into_var(self) -> Var<GradientRadius>
Conversion to Length::Factor and to radius.
Source§impl IntoVar<GradientStop> for Factor
impl IntoVar<GradientStop> for Factor
Source§fn into_var(self) -> Var<GradientStop>
fn into_var(self) -> Var<GradientStop>
Conversion to Length::Factor color hint.
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<Indentation> for Factor
impl IntoVar<Indentation> for Factor
fn into_var(self) -> Var<Indentation>
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 Mul<Factor> for LayerIndex
impl Mul<Factor> for LayerIndex
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 LayerIndex
impl MulAssign<Factor> for LayerIndex
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<Factor> for ZIndex
impl MulAssign<Factor> for ZIndex
Source§fn mul_assign(&mut self, rhs: Factor)
fn mul_assign(&mut self, rhs: Factor)
Performs the
*= operation. Read moreSource§impl MulAssign<Factor> for usize
impl MulAssign<Factor> for usize
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 SelectorValue for Factor
impl SelectorValue 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<CornerRadius> for Factor
impl IntoValue<EasingTime> for Factor
impl IntoValue<Factor> for FactorPercent
impl IntoValue<Factor> for Progress
impl IntoValue<Factor> for bool
impl IntoValue<Factor> for f32
impl IntoValue<Factor2d> for Factor
impl IntoValue<FactorPercent> for Factor
impl IntoValue<FactorSideOffsets> for Factor
impl IntoValue<FontStretch> for Factor
impl IntoValue<GradientRadius> for Factor
impl IntoValue<GradientStop> for Factor
impl IntoValue<GridSpacing> for Factor
impl IntoValue<Indentation> for Factor
impl IntoValue<Length> for Factor
impl IntoValue<Point> for Factor
impl IntoValue<Progress> 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§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.§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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> DataNoteValue for T
impl<T> DataNoteValue for 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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
Compare self to
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
Checks if this value is equivalent to the given key. Read more
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§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> 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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Separable for Twhere
T: Display,
impl<T> Separable for Twhere
T: Display,
Source§fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
Adds separators according to the given
SeparatorPolicy. Read moreSource§fn separate_with_commas(&self) -> String
fn separate_with_commas(&self) -> String
Inserts a comma every three digits from the right. Read more
Source§fn separate_with_spaces(&self) -> String
fn separate_with_spaces(&self) -> String
Inserts a space every three digits from the right. Read more
Source§fn separate_with_dots(&self) -> String
fn separate_with_dots(&self) -> String
Inserts a period every three digits from the right. Read more
Source§fn separate_with_underscores(&self) -> String
fn separate_with_underscores(&self) -> String
Inserts an underscore every three digits from the right. Read more