Struct zng_unit::FactorPercent
source · pub struct FactorPercent(pub f32);
Expand description
Multiplication factor in percentage (0%-100%).
See FactorUnits
for more details.
§Equality
Equality is determined using about_eq
with 0.001
epsilon.
Tuple Fields§
§0: f32
Implementations§
source§impl FactorPercent
impl FactorPercent
Trait Implementations§
source§impl Add for FactorPercent
impl Add for FactorPercent
source§impl AddAssign for FactorPercent
impl AddAssign for FactorPercent
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl Clone for FactorPercent
impl Clone for FactorPercent
source§fn clone(&self) -> FactorPercent
fn clone(&self) -> FactorPercent
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 FactorPercent
impl Debug for FactorPercent
source§impl<'de> Deserialize<'de> for FactorPercent
impl<'de> Deserialize<'de> for FactorPercent
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 Display for FactorPercent
impl Display for FactorPercent
source§impl Div<Factor> for FactorPercent
impl Div<Factor> for FactorPercent
source§impl Div for FactorPercent
impl Div for FactorPercent
source§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 for FactorPercent
impl DivAssign for FactorPercent
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moresource§impl From<Factor> for FactorPercent
impl From<Factor> for FactorPercent
source§impl From<FactorPercent> for Factor
impl From<FactorPercent> for Factor
source§fn from(value: FactorPercent) -> Self
fn from(value: FactorPercent) -> Self
Converts to this type from the input type.
source§impl From<FactorPercent> for RgbaComponent
impl From<FactorPercent> for RgbaComponent
Color channel value is in the [0..=100] range.
source§fn from(p: FactorPercent) -> Self
fn from(p: FactorPercent) -> Self
Converts to this type from the input type.
source§impl Mul<Factor> for FactorPercent
impl Mul<Factor> for FactorPercent
source§impl Mul for FactorPercent
impl Mul for FactorPercent
source§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 for FactorPercent
impl MulAssign for FactorPercent
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl Neg for FactorPercent
impl Neg for FactorPercent
source§impl PartialEq for FactorPercent
impl PartialEq for FactorPercent
source§impl Serialize for FactorPercent
impl Serialize for FactorPercent
source§impl Sub for FactorPercent
impl Sub for FactorPercent
source§impl SubAssign for FactorPercent
impl SubAssign for FactorPercent
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for FactorPercent
Auto Trait Implementations§
impl Freeze for FactorPercent
impl RefUnwindSafe for FactorPercent
impl Send for FactorPercent
impl Sync for FactorPercent
impl Unpin for FactorPercent
impl UnwindSafe for FactorPercent
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)