Enum AmountOfSubstanceUnit

Source
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

Source

pub fn get_yottamole() -> UnitDefinition

Source

pub fn get_zettamole() -> UnitDefinition

Source

pub fn get_examole() -> UnitDefinition

Source

pub fn get_petamole() -> UnitDefinition

Source

pub fn get_teramole() -> UnitDefinition

Source

pub fn get_gigamole() -> UnitDefinition

Source

pub fn get_megamole() -> UnitDefinition

Source

pub fn get_kilomole() -> UnitDefinition

Source

pub fn get_hectomole() -> UnitDefinition

Source

pub fn get_decamole() -> UnitDefinition

Source

pub fn get_mole() -> UnitDefinition

Source

pub fn get_decimole() -> UnitDefinition

Source

pub fn get_centimole() -> UnitDefinition

Source

pub fn get_millimole() -> UnitDefinition

Source

pub fn get_micromole() -> UnitDefinition

Source

pub fn get_nanomole() -> UnitDefinition

Source

pub fn get_picomole() -> UnitDefinition

Source

pub fn get_femtomole() -> UnitDefinition

Source

pub fn get_attomole() -> UnitDefinition

Source

pub fn get_zeptomole() -> UnitDefinition

Source

pub fn get_yoctomole() -> UnitDefinition

Source

pub fn get_particle() -> UnitDefinition

Source

pub fn get_standard_cubic_meter() -> UnitDefinition

Source

pub fn get_standard_liter() -> UnitDefinition

Source

pub fn get_standard_centimeter() -> UnitDefinition

Source

pub fn get_standard_cubic_foot() -> UnitDefinition

Source

pub const fn multiplier(&self) -> f64

Multiplier of unit to its base quantity.

Source

pub fn abbreviation(&self) -> &'static str

Abbreviation of unit.

Source

pub fn singular(&self) -> &'static str

Singular name of unit.

Source

pub fn plural(&self) -> &'static str

Plural name of unit.

Source

pub fn units() -> &'static [&'static str]

Available units for this [AmountOfSubstanceUnit].

Trait Implementations§

Source§

impl Clone for AmountOfSubstanceUnit

Source§

fn clone(&self) -> AmountOfSubstanceUnit

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AmountOfSubstanceUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AmountOfSubstanceUnit

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for AmountOfSubstanceUnit

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FixedQuantity<AmountOfSubstanceUnit> for AmountOfSubstance

Source§

fn unit(&self) -> AmountOfSubstanceUnit

Return unit associated with this quantity
Source§

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)

Convert from this unit to another (modifies current quantity). No validation of base unit is made.
Source§

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,

Try to convert from this unit to another (creates a copy)
Source§

impl<const N: usize> FixedSliceQuantity<AmountOfSubstanceUnit, f64> for AmountOfSubstanceArray<N>

Source§

fn unit(&self) -> AmountOfSubstanceUnit

Return unit associated with this quantity
Source§

fn values(&self) -> &[f64]

Return values in quantity
Source§

fn values_mut(&mut self) -> &mut [f64]

Return mutable values in quantity
Source§

fn len(&self) -> usize

Return number of values in quantity
Source§

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)

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,

Attempt to convert the unit given in unit to a UnitType. Base unit validation is made here.
Source§

impl FixedSliceQuantity<AmountOfSubstanceUnit, f64> for AmountOfSubstanceVec

Source§

fn unit(&self) -> AmountOfSubstanceUnit

Return unit associated with this quantity
Source§

fn values(&self) -> &[f64]

Return values in quantity
Source§

fn values_mut(&mut self) -> &mut [f64]

Return mutable values in quantity
Source§

fn len(&self) -> usize

Return number of values in quantity
Source§

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)

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,

Attempt to convert the unit given in unit to a UnitType. Base unit validation is made here.
Source§

impl From<AmountOfSubstanceUnit> for UnitDefinition

Source§

fn from(value: AmountOfSubstanceUnit) -> Self

Converts to this type from the input type.
Source§

impl From<AmountOfSubstanceUnit> for Units

Source§

fn from(value: AmountOfSubstanceUnit) -> Self

Converts to this type from the input type.
Source§

impl Hash for AmountOfSubstanceUnit

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for AmountOfSubstanceUnit

Source§

fn eq(&self, other: &AmountOfSubstanceUnit) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<&str> for AmountOfSubstanceUnit

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<UnitDefinition> for AmountOfSubstanceUnit

Source§

type Error = RuntimeUnitError

The type returned in the event of a conversion error.
Source§

fn try_from(value: UnitDefinition) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Units> for AmountOfSubstanceUnit

Source§

type Error = RuntimeUnitError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Units) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Unit for AmountOfSubstanceUnit

Source§

fn definition(&self) -> UnitDefinition

Return unit definition for this Unit Type

Source§

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

Compute conversion factor from this unit to another (no check of unit compatibility is made).
Source§

impl Copy for AmountOfSubstanceUnit

Source§

impl Eq for AmountOfSubstanceUnit

Source§

impl StructuralPartialEq for AmountOfSubstanceUnit

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.