Struct runtime_units::AmountOfSubstance
source · pub struct AmountOfSubstance {
pub value: f64,
pub unit: AmountOfSubstanceUnit,
}Expand description
Amount of substance (base unit mole, mol).
Fields§
§value: f64§unit: AmountOfSubstanceUnitImplementations§
source§impl AmountOfSubstance
impl AmountOfSubstance
pub fn new(value: f64, unit: AmountOfSubstanceUnit) -> Self
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_mol(value: f64) -> Self
pub fn standard_cubic_mol(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::standard_cubic_mol.
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_centimol(value: f64) -> Self
pub fn standard_centimol(value: f64) -> Self
Create a new AmountOfSubstance with units of AmountOfSubstanceUnit::standard_centimol.
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 to_quantity(&self) -> Quantity
pub fn to_quantity(&self) -> Quantity
Create a Quantity from this AmountOfSubstance.
Trait Implementations§
source§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 From<AmountOfSubstance> for AmountOfSubstanceQuantity
impl From<AmountOfSubstance> for AmountOfSubstanceQuantity
source§fn from(quantity: AmountOfSubstance) -> Self
fn from(quantity: 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 PartialEq for AmountOfSubstance
impl PartialEq for AmountOfSubstance
source§fn eq(&self, other: &AmountOfSubstance) -> bool
fn eq(&self, other: &AmountOfSubstance) -> bool
self and other values to be equal, and is used
by ==.