pub enum Units {
AmountOfSubstance(AmountOfSubstanceUnit),
Angle(AngleUnit),
Dimensionless(DimensionlessUnit),
ElectricCurrent(ElectricCurrentUnit),
Length(LengthUnit),
Luminance(LuminanceUnit),
Mass(MassUnit),
TemperatureInterval(TemperatureIntervalUnit),
Time(TimeUnit),
}Expand description
A wrapper to hold all available units supported by the library. Contains utilities to convert from
a given arbitrary unit to the underlying Quantity that is used to perform unit conversion calculations.
Variants§
AmountOfSubstance(AmountOfSubstanceUnit)
Angle(AngleUnit)
Dimensionless(DimensionlessUnit)
ElectricCurrent(ElectricCurrentUnit)
Length(LengthUnit)
Luminance(LuminanceUnit)
Mass(MassUnit)
TemperatureInterval(TemperatureIntervalUnit)
Time(TimeUnit)
Implementations§
Trait Implementations§
Source§impl From<&AmountOfSubstance> for Units
impl From<&AmountOfSubstance> for Units
Source§fn from(value: &AmountOfSubstance) -> Self
fn from(value: &AmountOfSubstance) -> Self
Converts to this type from the input type.
Source§impl From<&AmountOfSubstanceVec> for Units
impl From<&AmountOfSubstanceVec> for Units
Source§fn from(value: &AmountOfSubstanceVec) -> Self
fn from(value: &AmountOfSubstanceVec) -> Self
Converts to this type from the input type.
Source§impl From<&Dimensionless> for Units
impl From<&Dimensionless> for Units
Source§fn from(value: &Dimensionless) -> Self
fn from(value: &Dimensionless) -> Self
Converts to this type from the input type.
Source§impl From<&DimensionlessVec> for Units
impl From<&DimensionlessVec> for Units
Source§fn from(value: &DimensionlessVec) -> Self
fn from(value: &DimensionlessVec) -> Self
Converts to this type from the input type.
Source§impl From<&ElectricCurrent> for Units
impl From<&ElectricCurrent> for Units
Source§fn from(value: &ElectricCurrent) -> Self
fn from(value: &ElectricCurrent) -> Self
Converts to this type from the input type.
Source§impl From<&ElectricCurrentVec> for Units
impl From<&ElectricCurrentVec> for Units
Source§fn from(value: &ElectricCurrentVec) -> Self
fn from(value: &ElectricCurrentVec) -> Self
Converts to this type from the input type.
Source§impl From<&LuminanceVec> for Units
impl From<&LuminanceVec> for Units
Source§fn from(value: &LuminanceVec) -> Self
fn from(value: &LuminanceVec) -> Self
Converts to this type from the input type.
Source§impl From<&TemperatureInterval> for Units
impl From<&TemperatureInterval> for Units
Source§fn from(value: &TemperatureInterval) -> Self
fn from(value: &TemperatureInterval) -> Self
Converts to this type from the input type.
Source§impl From<&TemperatureIntervalVec> for Units
impl From<&TemperatureIntervalVec> for Units
Source§fn from(value: &TemperatureIntervalVec) -> Self
fn from(value: &TemperatureIntervalVec) -> Self
Converts to this type from the input type.
Source§impl From<AmountOfSubstance> for Units
impl From<AmountOfSubstance> for Units
Source§fn from(value: AmountOfSubstance) -> Self
fn from(value: AmountOfSubstance) -> 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 From<AmountOfSubstanceVec> for Units
impl From<AmountOfSubstanceVec> for Units
Source§fn from(value: AmountOfSubstanceVec) -> Self
fn from(value: AmountOfSubstanceVec) -> Self
Converts to this type from the input type.
Source§impl From<Dimensionless> for Units
impl From<Dimensionless> for Units
Source§fn from(value: Dimensionless) -> Self
fn from(value: Dimensionless) -> Self
Converts to this type from the input type.
Source§impl From<DimensionlessUnit> for Units
impl From<DimensionlessUnit> for Units
Source§fn from(value: DimensionlessUnit) -> Self
fn from(value: DimensionlessUnit) -> Self
Converts to this type from the input type.
Source§impl From<DimensionlessVec> for Units
impl From<DimensionlessVec> for Units
Source§fn from(value: DimensionlessVec) -> Self
fn from(value: DimensionlessVec) -> Self
Converts to this type from the input type.
Source§impl From<ElectricCurrent> for Units
impl From<ElectricCurrent> for Units
Source§fn from(value: ElectricCurrent) -> Self
fn from(value: ElectricCurrent) -> Self
Converts to this type from the input type.
Source§impl From<ElectricCurrentUnit> for Units
impl From<ElectricCurrentUnit> for Units
Source§fn from(value: ElectricCurrentUnit) -> Self
fn from(value: ElectricCurrentUnit) -> Self
Converts to this type from the input type.
Source§impl From<ElectricCurrentVec> for Units
impl From<ElectricCurrentVec> for Units
Source§fn from(value: ElectricCurrentVec) -> Self
fn from(value: ElectricCurrentVec) -> Self
Converts to this type from the input type.
Source§impl From<LengthUnit> for Units
impl From<LengthUnit> for Units
Source§fn from(value: LengthUnit) -> Self
fn from(value: LengthUnit) -> Self
Converts to this type from the input type.
Source§impl From<LuminanceUnit> for Units
impl From<LuminanceUnit> for Units
Source§fn from(value: LuminanceUnit) -> Self
fn from(value: LuminanceUnit) -> Self
Converts to this type from the input type.
Source§impl From<LuminanceVec> for Units
impl From<LuminanceVec> for Units
Source§fn from(value: LuminanceVec) -> Self
fn from(value: LuminanceVec) -> Self
Converts to this type from the input type.
Source§impl From<TemperatureInterval> for Units
impl From<TemperatureInterval> for Units
Source§fn from(value: TemperatureInterval) -> Self
fn from(value: TemperatureInterval) -> Self
Converts to this type from the input type.
Source§impl From<TemperatureIntervalUnit> for Units
impl From<TemperatureIntervalUnit> for Units
Source§fn from(value: TemperatureIntervalUnit) -> Self
fn from(value: TemperatureIntervalUnit) -> Self
Converts to this type from the input type.
Source§impl From<TemperatureIntervalVec> for Units
impl From<TemperatureIntervalVec> for Units
Source§fn from(value: TemperatureIntervalVec) -> Self
fn from(value: TemperatureIntervalVec) -> Self
Converts to this type from the input type.
Source§impl From<Units> for Quantities
A means to create a default quantity with a given set of units.
impl From<Units> for Quantities
A means to create a default quantity with a given set of units.
Source§impl<const N: usize> From<Units> for QuantitiesArray<N>
A means to create a default quantity with a given set of units.
impl<const N: usize> From<Units> for QuantitiesArray<N>
A means to create a default quantity with a given set of units.
Source§impl From<Units> for QuantitiesVec
A means to create a default quantity with a given set of units.
impl From<Units> for QuantitiesVec
A means to create a default quantity with a given set of units.
Source§impl From<Units> for UnitDefinition
impl From<Units> for UnitDefinition
Source§impl TryFrom<Units> for AmountOfSubstanceUnit
impl TryFrom<Units> for AmountOfSubstanceUnit
Source§impl TryFrom<Units> for DimensionlessUnit
impl TryFrom<Units> for DimensionlessUnit
Source§impl TryFrom<Units> for ElectricCurrentUnit
impl TryFrom<Units> for ElectricCurrentUnit
Source§impl TryFrom<Units> for LengthUnit
impl TryFrom<Units> for LengthUnit
Source§impl TryFrom<Units> for LuminanceUnit
impl TryFrom<Units> for LuminanceUnit
Source§impl TryFrom<Units> for TemperatureIntervalUnit
impl TryFrom<Units> for TemperatureIntervalUnit
impl Copy for Units
impl Eq for Units
impl StructuralPartialEq for Units
Auto Trait Implementations§
impl Freeze for Units
impl RefUnwindSafe for Units
impl Send for Units
impl Sync for Units
impl Unpin for Units
impl UnwindSafe for Units
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