pub enum AmountOfSubstanceUnit {
Show 26 variants
yottamole,
zettamole,
examole,
petamole,
teramole,
gigamole,
megamole,
kilomole,
hectomole,
decamole,
mole,
decimole,
centimole,
millimole,
micromole,
nanomole,
picomole,
femtomole,
attomole,
zeptomole,
yoctomole,
particle,
standard_cubic_meter,
standard_liter,
standard_centimeter,
standard_cubic_foot,
}Expand description
Amount of substance (base UnitDefinition mole, mol).
Variants§
yottamole
zettamole
examole
petamole
teramole
gigamole
megamole
kilomole
hectomole
decamole
mole
decimole
centimole
millimole
micromole
nanomole
picomole
femtomole
attomole
zeptomole
yoctomole
particle
standard_cubic_meter
standard_liter
standard_centimeter
standard_cubic_foot
Implementations§
Source§impl AmountOfSubstanceUnit
impl AmountOfSubstanceUnit
pub fn get_yottamole() -> UnitDefinition
pub fn get_zettamole() -> UnitDefinition
pub fn get_examole() -> UnitDefinition
pub fn get_petamole() -> UnitDefinition
pub fn get_teramole() -> UnitDefinition
pub fn get_gigamole() -> UnitDefinition
pub fn get_megamole() -> UnitDefinition
pub fn get_kilomole() -> UnitDefinition
pub fn get_hectomole() -> UnitDefinition
pub fn get_decamole() -> UnitDefinition
pub fn get_mole() -> UnitDefinition
pub fn get_decimole() -> UnitDefinition
pub fn get_centimole() -> UnitDefinition
pub fn get_millimole() -> UnitDefinition
pub fn get_micromole() -> UnitDefinition
pub fn get_nanomole() -> UnitDefinition
pub fn get_picomole() -> UnitDefinition
pub fn get_femtomole() -> UnitDefinition
pub fn get_attomole() -> UnitDefinition
pub fn get_zeptomole() -> UnitDefinition
pub fn get_yoctomole() -> UnitDefinition
pub fn get_particle() -> UnitDefinition
pub fn get_standard_cubic_meter() -> UnitDefinition
pub fn get_standard_liter() -> UnitDefinition
pub fn get_standard_centimeter() -> UnitDefinition
pub fn get_standard_cubic_foot() -> UnitDefinition
Sourcepub const fn multiplier(&self) -> f64
pub const fn multiplier(&self) -> f64
Multiplier of unit to its base quantity.
Sourcepub fn abbreviation(&self) -> &'static str
pub fn abbreviation(&self) -> &'static str
Abbreviation of unit.
Trait Implementations§
Source§impl Clone for AmountOfSubstanceUnit
impl Clone for AmountOfSubstanceUnit
Source§fn clone(&self) -> AmountOfSubstanceUnit
fn clone(&self) -> AmountOfSubstanceUnit
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AmountOfSubstanceUnit
impl Debug for AmountOfSubstanceUnit
Source§impl Default for AmountOfSubstanceUnit
impl Default for AmountOfSubstanceUnit
Source§impl Display for AmountOfSubstanceUnit
impl Display for AmountOfSubstanceUnit
Source§impl FixedQuantity<AmountOfSubstanceUnit> for AmountOfSubstance
impl FixedQuantity<AmountOfSubstanceUnit> for AmountOfSubstance
Source§fn unit(&self) -> AmountOfSubstanceUnit
fn unit(&self) -> AmountOfSubstanceUnit
Return unit associated with this quantity
Source§fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
Convert from this unit to another (creates a copy). No validation of base unit is made.
Source§fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
Convert from this unit to another (modifies current quantity). No validation of base unit is made.
Source§fn unit_mut(&mut self) -> &mut AmountOfSubstanceUnit
fn unit_mut(&mut self) -> &mut AmountOfSubstanceUnit
Return mutable unit associated with this quantity
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,
Try to convert from this unit to another (creates a copy)
Source§impl<const N: usize> FixedSliceQuantity<AmountOfSubstanceUnit, f64> for AmountOfSubstanceArray<N>
impl<const N: usize> FixedSliceQuantity<AmountOfSubstanceUnit, f64> for AmountOfSubstanceArray<N>
Source§fn unit(&self) -> AmountOfSubstanceUnit
fn unit(&self) -> AmountOfSubstanceUnit
Return unit associated with this quantity
Source§fn values_mut(&mut self) -> &mut [f64]
fn values_mut(&mut self) -> &mut [f64]
Return mutable values in quantity
Source§fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
Convert a unit of one
UnitType to another of the same type. No validation of base unit is made.Source§fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
Mutate current quantity, convering a unit of one
UnitType to another of the same type. No validation of base unit is made.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,
Attempt to convert the unit given in
unit to a UnitType. Base unit validation is made here.Source§impl FixedSliceQuantity<AmountOfSubstanceUnit, f64> for AmountOfSubstanceVec
impl FixedSliceQuantity<AmountOfSubstanceUnit, f64> for AmountOfSubstanceVec
Source§fn unit(&self) -> AmountOfSubstanceUnit
fn unit(&self) -> AmountOfSubstanceUnit
Return unit associated with this quantity
Source§fn values_mut(&mut self) -> &mut [f64]
fn values_mut(&mut self) -> &mut [f64]
Return mutable values in quantity
Source§fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
fn convert(&self, unit: AmountOfSubstanceUnit) -> Self
Convert a unit of one
UnitType to another of the same type. No validation of base unit is made.Source§fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
fn convert_mut(&mut self, unit: AmountOfSubstanceUnit)
Mutate current quantity, convering a unit of one
UnitType to another of the same type. No validation of base unit is made.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,
Attempt to convert the unit given in
unit to a UnitType. Base unit validation is made here.Source§impl From<AmountOfSubstanceUnit> for UnitDefinition
impl From<AmountOfSubstanceUnit> for UnitDefinition
Source§fn from(value: AmountOfSubstanceUnit) -> Self
fn from(value: AmountOfSubstanceUnit) -> Self
Converts to this type from the input type.
Source§impl From<AmountOfSubstanceUnit> for Units
impl From<AmountOfSubstanceUnit> for Units
Source§fn from(value: AmountOfSubstanceUnit) -> Self
fn from(value: AmountOfSubstanceUnit) -> Self
Converts to this type from the input type.
Source§impl Hash for AmountOfSubstanceUnit
impl Hash for AmountOfSubstanceUnit
Source§impl PartialEq for AmountOfSubstanceUnit
impl PartialEq for AmountOfSubstanceUnit
Source§impl TryFrom<&str> for AmountOfSubstanceUnit
impl TryFrom<&str> for AmountOfSubstanceUnit
Source§impl TryFrom<UnitDefinition> for AmountOfSubstanceUnit
impl TryFrom<UnitDefinition> for AmountOfSubstanceUnit
Source§type Error = RuntimeUnitError
type Error = RuntimeUnitError
The type returned in the event of a conversion error.
Source§impl TryFrom<Units> for AmountOfSubstanceUnit
impl TryFrom<Units> for AmountOfSubstanceUnit
Source§impl Unit for AmountOfSubstanceUnit
impl Unit for AmountOfSubstanceUnit
Source§fn definition(&self) -> UnitDefinition
fn definition(&self) -> UnitDefinition
Return unit definition for this Unit Type
Source§fn try_convert(&self, unit: UnitDefinition) -> Result<f64, RuntimeUnitError>
fn try_convert(&self, unit: UnitDefinition) -> Result<f64, RuntimeUnitError>
Try to compute conversion factor from this unit to another.
Source§fn convert_unchecked(&self, unit: Self) -> f64
fn convert_unchecked(&self, unit: Self) -> f64
Compute conversion factor from this unit to another (no check of unit compatibility is made).
impl Copy for AmountOfSubstanceUnit
impl Eq for AmountOfSubstanceUnit
impl StructuralPartialEq for AmountOfSubstanceUnit
Auto Trait Implementations§
impl Freeze for AmountOfSubstanceUnit
impl RefUnwindSafe for AmountOfSubstanceUnit
impl Send for AmountOfSubstanceUnit
impl Sync for AmountOfSubstanceUnit
impl Unpin for AmountOfSubstanceUnit
impl UnwindSafe for AmountOfSubstanceUnit
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