pub struct AmountOfSubstance { /* private fields */ }Expand description
Amount of substance (base UnitDefinition mole, mol).
Scalar storage of a quantity (f64 and AmountOfSubstanceUnit).
Implementations§
Source§impl AmountOfSubstance
impl AmountOfSubstance
Sourcepub fn new(value: f64, unit: AmountOfSubstanceUnit) -> Self
pub fn new(value: f64, unit: AmountOfSubstanceUnit) -> Self
Create a new AmountOfSubstanceUnit.
Sourcepub fn yottamole(value: f64) -> Self
pub fn yottamole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::yottamole.
Sourcepub fn zettamole(value: f64) -> Self
pub fn zettamole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::zettamole.
Sourcepub fn examole(value: f64) -> Self
pub fn examole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::examole.
Sourcepub fn petamole(value: f64) -> Self
pub fn petamole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::petamole.
Sourcepub fn teramole(value: f64) -> Self
pub fn teramole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::teramole.
Sourcepub fn gigamole(value: f64) -> Self
pub fn gigamole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::gigamole.
Sourcepub fn megamole(value: f64) -> Self
pub fn megamole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::megamole.
Sourcepub fn kilomole(value: f64) -> Self
pub fn kilomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::kilomole.
Sourcepub fn hectomole(value: f64) -> Self
pub fn hectomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::hectomole.
Sourcepub fn decamole(value: f64) -> Self
pub fn decamole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::decamole.
Sourcepub fn mole(value: f64) -> Self
pub fn mole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::mole.
Sourcepub fn decimole(value: f64) -> Self
pub fn decimole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::decimole.
Sourcepub fn centimole(value: f64) -> Self
pub fn centimole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::centimole.
Sourcepub fn millimole(value: f64) -> Self
pub fn millimole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::millimole.
Sourcepub fn micromole(value: f64) -> Self
pub fn micromole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::micromole.
Sourcepub fn nanomole(value: f64) -> Self
pub fn nanomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::nanomole.
Sourcepub fn picomole(value: f64) -> Self
pub fn picomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::picomole.
Sourcepub fn femtomole(value: f64) -> Self
pub fn femtomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::femtomole.
Sourcepub fn attomole(value: f64) -> Self
pub fn attomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::attomole.
Sourcepub fn zeptomole(value: f64) -> Self
pub fn zeptomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::zeptomole.
Sourcepub fn yoctomole(value: f64) -> Self
pub fn yoctomole(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::yoctomole.
Sourcepub fn particle(value: f64) -> Self
pub fn particle(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::particle.
Sourcepub fn standard_cubic_meter(value: f64) -> Self
pub fn standard_cubic_meter(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::standard_cubic_meter.
Sourcepub fn standard_liter(value: f64) -> Self
pub fn standard_liter(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::standard_liter.
Sourcepub fn standard_centimeter(value: f64) -> Self
pub fn standard_centimeter(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::standard_centimeter.
Sourcepub fn standard_cubic_foot(value: f64) -> Self
pub fn standard_cubic_foot(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::standard_cubic_foot.
Sourcepub fn value(&self) -> f64
pub fn value(&self) -> f64
Retrieve the value associated with this AmountOfSubstance.
Sourcepub fn value_mut(&mut self) -> &mut f64
pub fn value_mut(&mut self) -> &mut f64
Retrieve the mutable value associated with this AmountOfSubstance.
Sourcepub fn definition(&self) -> UnitDefinition
pub fn definition(&self) -> UnitDefinition
Retrieve the UnitDefinition associated with this AmountOfSubstance.
Sourcepub fn to_yottamole(&self) -> Self
pub fn to_yottamole(&self) -> Self
Convert to AmountOfSubstanceUnit::yottamole.
Sourcepub fn to_zettamole(&self) -> Self
pub fn to_zettamole(&self) -> Self
Convert to AmountOfSubstanceUnit::zettamole.
Sourcepub fn to_examole(&self) -> Self
pub fn to_examole(&self) -> Self
Convert to AmountOfSubstanceUnit::examole.
Sourcepub fn to_petamole(&self) -> Self
pub fn to_petamole(&self) -> Self
Convert to AmountOfSubstanceUnit::petamole.
Sourcepub fn to_teramole(&self) -> Self
pub fn to_teramole(&self) -> Self
Convert to AmountOfSubstanceUnit::teramole.
Sourcepub fn to_gigamole(&self) -> Self
pub fn to_gigamole(&self) -> Self
Convert to AmountOfSubstanceUnit::gigamole.
Sourcepub fn to_megamole(&self) -> Self
pub fn to_megamole(&self) -> Self
Convert to AmountOfSubstanceUnit::megamole.
Sourcepub fn to_kilomole(&self) -> Self
pub fn to_kilomole(&self) -> Self
Convert to AmountOfSubstanceUnit::kilomole.
Sourcepub fn to_hectomole(&self) -> Self
pub fn to_hectomole(&self) -> Self
Convert to AmountOfSubstanceUnit::hectomole.
Sourcepub fn to_decamole(&self) -> Self
pub fn to_decamole(&self) -> Self
Convert to AmountOfSubstanceUnit::decamole.
Sourcepub fn to_mole(&self) -> Self
pub fn to_mole(&self) -> Self
Convert to AmountOfSubstanceUnit::mole.
Sourcepub fn to_decimole(&self) -> Self
pub fn to_decimole(&self) -> Self
Convert to AmountOfSubstanceUnit::decimole.
Sourcepub fn to_centimole(&self) -> Self
pub fn to_centimole(&self) -> Self
Convert to AmountOfSubstanceUnit::centimole.
Sourcepub fn to_millimole(&self) -> Self
pub fn to_millimole(&self) -> Self
Convert to AmountOfSubstanceUnit::millimole.
Sourcepub fn to_micromole(&self) -> Self
pub fn to_micromole(&self) -> Self
Convert to AmountOfSubstanceUnit::micromole.
Sourcepub fn to_nanomole(&self) -> Self
pub fn to_nanomole(&self) -> Self
Convert to AmountOfSubstanceUnit::nanomole.
Sourcepub fn to_picomole(&self) -> Self
pub fn to_picomole(&self) -> Self
Convert to AmountOfSubstanceUnit::picomole.
Sourcepub fn to_femtomole(&self) -> Self
pub fn to_femtomole(&self) -> Self
Convert to AmountOfSubstanceUnit::femtomole.
Sourcepub fn to_attomole(&self) -> Self
pub fn to_attomole(&self) -> Self
Convert to AmountOfSubstanceUnit::attomole.
Sourcepub fn to_zeptomole(&self) -> Self
pub fn to_zeptomole(&self) -> Self
Convert to AmountOfSubstanceUnit::zeptomole.
Sourcepub fn to_yoctomole(&self) -> Self
pub fn to_yoctomole(&self) -> Self
Convert to AmountOfSubstanceUnit::yoctomole.
Sourcepub fn to_particle(&self) -> Self
pub fn to_particle(&self) -> Self
Convert to AmountOfSubstanceUnit::particle.
Sourcepub fn to_standard_cubic_meter(&self) -> Self
pub fn to_standard_cubic_meter(&self) -> Self
Convert to AmountOfSubstanceUnit::standard_cubic_meter.
Sourcepub fn to_standard_liter(&self) -> Self
pub fn to_standard_liter(&self) -> Self
Convert to AmountOfSubstanceUnit::standard_liter.
Sourcepub fn to_standard_centimeter(&self) -> Self
pub fn to_standard_centimeter(&self) -> Self
Convert to AmountOfSubstanceUnit::standard_centimeter.
Sourcepub fn to_standard_cubic_foot(&self) -> Self
pub fn to_standard_cubic_foot(&self) -> Self
Convert to AmountOfSubstanceUnit::standard_cubic_foot.
Trait Implementations§
Source§impl Add<Quantity> for AmountOfSubstance
impl Add<Quantity> for AmountOfSubstance
Source§impl Add for AmountOfSubstance
impl Add for AmountOfSubstance
Source§type Output = AmountOfSubstance
type Output = AmountOfSubstance
+ operator.Source§fn add(self, rhs: AmountOfSubstance) -> Self
fn add(self, rhs: AmountOfSubstance) -> Self
+ operation. Read moreSource§impl AddAssign<Quantity> for AmountOfSubstance
impl AddAssign<Quantity> for AmountOfSubstance
Source§fn add_assign(&mut self, rhs: Quantity)
fn add_assign(&mut self, rhs: Quantity)
+= operation. Read moreSource§impl AddAssign for AmountOfSubstance
impl AddAssign for AmountOfSubstance
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl Clone for AmountOfSubstance
impl Clone for AmountOfSubstance
Source§fn clone(&self) -> AmountOfSubstance
fn clone(&self) -> AmountOfSubstance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AmountOfSubstance
impl Debug for AmountOfSubstance
Source§impl Default for AmountOfSubstance
impl Default for AmountOfSubstance
Source§fn default() -> AmountOfSubstance
fn default() -> AmountOfSubstance
Source§impl<T: IsScalarQuantity> Div<T> for AmountOfSubstance
impl<T: IsScalarQuantity> Div<T> for AmountOfSubstance
Source§impl Div<f64> for AmountOfSubstance
impl Div<f64> for AmountOfSubstance
Source§impl DivAssign<f64> for AmountOfSubstance
impl DivAssign<f64> for AmountOfSubstance
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
/= operation. Read moreSource§impl FixedQuantity<AmountOfSubstanceUnit> for AmountOfSubstance
impl FixedQuantity<AmountOfSubstanceUnit> for AmountOfSubstance
Source§fn unit(&self) -> AmountOfSubstanceUnit
fn unit(&self) -> AmountOfSubstanceUnit
Source§fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
Source§fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
Source§fn unit_mut(&mut self) -> &mut AmountOfSubstanceUnit
fn unit_mut(&mut self) -> &mut AmountOfSubstanceUnit
Source§fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
fn try_convert(&self, unit: Units) -> Result<Self, RuntimeUnitError>where
Self: Sized,
Source§impl From<&AmountOfSubstance> for Units
impl From<&AmountOfSubstance> for Units
Source§fn from(value: &AmountOfSubstance) -> Self
fn from(value: &AmountOfSubstance) -> Self
Source§impl From<AmountOfSubstance> for Quantity
impl From<AmountOfSubstance> for Quantity
Source§fn from(quantity: AmountOfSubstance) -> Self
fn from(quantity: AmountOfSubstance) -> Self
Source§impl From<AmountOfSubstance> for UnitDefinition
impl From<AmountOfSubstance> for UnitDefinition
Source§fn from(value: AmountOfSubstance) -> Self
fn from(value: AmountOfSubstance) -> Self
Source§impl From<AmountOfSubstance> for Units
impl From<AmountOfSubstance> for Units
Source§fn from(value: AmountOfSubstance) -> Self
fn from(value: AmountOfSubstance) -> Self
Source§impl From<Quantity> for AmountOfSubstance
impl From<Quantity> for AmountOfSubstance
Source§fn from(quantity: Quantity) -> AmountOfSubstance
fn from(quantity: Quantity) -> AmountOfSubstance
Source§impl<T: IsScalarQuantity> Mul<T> for AmountOfSubstance
impl<T: IsScalarQuantity> Mul<T> for AmountOfSubstance
Source§impl Mul<f64> for AmountOfSubstance
impl Mul<f64> for AmountOfSubstance
Source§impl MulAssign<f64> for AmountOfSubstance
impl MulAssign<f64> for AmountOfSubstance
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
*= operation. Read moreSource§impl PartialEq<AmountOfSubstance> for Quantity
impl PartialEq<AmountOfSubstance> for Quantity
Source§impl PartialEq<Quantity> for AmountOfSubstance
impl PartialEq<Quantity> for AmountOfSubstance
Source§impl PartialEq for AmountOfSubstance
impl PartialEq for AmountOfSubstance
Source§impl PartialOrd for AmountOfSubstance
impl PartialOrd for AmountOfSubstance
Source§impl Sub<Quantity> for AmountOfSubstance
impl Sub<Quantity> for AmountOfSubstance
Source§impl Sub for AmountOfSubstance
impl Sub for AmountOfSubstance
Source§type Output = AmountOfSubstance
type Output = AmountOfSubstance
- operator.Source§fn sub(self, rhs: AmountOfSubstance) -> Self
fn sub(self, rhs: AmountOfSubstance) -> Self
- operation. Read moreSource§impl SubAssign<Quantity> for AmountOfSubstance
impl SubAssign<Quantity> for AmountOfSubstance
Source§fn sub_assign(&mut self, rhs: Quantity)
fn sub_assign(&mut self, rhs: Quantity)
-= operation. Read moreSource§impl SubAssign for AmountOfSubstance
impl SubAssign for AmountOfSubstance
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read more